[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] New test for 'svnadmin lslocks' and 'svnadmin rmlocks'

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 25 Jul 2011 15:45:48 +0100

Philip Martin <philip.martin_at_wandisco.com> writes:

> Noorul Islam K M <noorul_at_collab.net> writes:
>
>> +def test_lslocks_and_rmlocks(sbox):
>> + "test 'svnadmin lslocks' and 'svnadmin rmlocks'"
>> +
>> + def verify_lslocks_output(expected, actual):
>> + """Verify expected output and actual output match."""
>> + expected_output = svntest.verify.UnorderedRegexOutput(expected)
>> + svntest.verify.compare_and_display_lines('message', 'label',
>> + expected_output, output)
>> + svntest.verify.verify_exit_code(None, exit_code, 0)
>
> So exit_code is the variable of that name that is in scope at the call
> site? I'm not much of a Python expert, is that good practice?

What confuses me is that expected and actual are parameters and
exit_code is picked up from a different scope. Is that intentional?
Why are two things passed as parameters and one thing transferred by
scope?

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-07-25 16:46:26 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.