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

Re: svn commit: r24383 - trunk/subversion/tests/cmdline/svntest

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2007-04-05 22:16:50 CEST

Daniel Rall wrote:
> On Thu, 05 Apr 2007, Hyrum K. Wright wrote:
>
>> Daniel Rall wrote:
>>> On Thu, 05 Apr 2007, Malcolm Rowe wrote:
>>>
>>>> On Thu, Apr 05, 2007 at 11:06:24AM +0200, Michael Haggerty wrote:
>>>>> hwright@tigris.org wrote:
>>>>>> Author: hwright
>>>>>> Date: Tue Apr 3 10:00:26 2007
>>>>>> New Revision: 24383
>>>>>>
>>>>>> Log:
>>>>>> In the test suite, use Python boolean values instead of integers masquerading
>>>>>> as booleans.
>>>>>>
>>>>>> * subversion/test/cmdline/svntest/main.py:
>>>>>> (windows, platform_with_os_wait, verbose_mode, cleanup_mode, enable_sasl):
>>>>>> Use True and False, instead of 1 and 0.
>>>>>>
>>>>>>
>>>>>> Modified:
>>>>>> trunk/subversion/tests/cmdline/svntest/main.py
>>>>>> [...]
>>>>> What version of Python is required for the test suite?
>>>>>
>>>> 2.0, so you're right, we need to fix this.
>>>>
>>>> I thought we already had our own custom True and False, but I can't find
>>>> them now, so I guess not.
>>> Yup, 2.0 -- I wondered the same thing when I saw this commit go by,
>>> but didn't know in what version of Python True and False were
>>> introduced.
>>>
>>> I'd be in favor of the test suite defining True and False if they're
>>> not already defined.
>> I didn't realize that True and False haven't been defined since 2.0. I
>> would also be in favor of defining them. Would the following work:
>>
>> try:
>> False
>> except:
>> False = 0
>> True = 1
>
> Yup, that should work -- the initial reference to False should work in
> 2.2+, and fail with a NameError when not recognized.

Great. I've committed this in r24459, after noticing that Michael
proposed the exact same thing in his original mail. :)

-Hyrum

Received on Thu Apr 5 22:17:07 2007

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.