[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: Michael Haggerty <mhagger_at_alum.mit.edu>
Date: 2007-04-05 11:06:24 CEST

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?

The Python pseudo-boolean values True and False were only added in
Python 2.2.1, and true booleans (including the bool() built-in function)
only in 2.3.0:


cvs2svn still supports Python 2.2, so we use a module boolean.py:

# Pretend we have true booleans on older python versions:
  True = 1
  False = 0

  def bool(x):
    return not not x

which is imported like this:

from cvs2svn_lib.boolean import *

Depending on the Python version requirement, similar measures might be
required in svntest.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 5 11:06:46 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.