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

Re: update_tests.py:obstructed_update_alters_wc_props broken?

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-04-09 23:42:35 CEST

Philip Martin wrote:
> I'm getting this failure:
>
> $ .../update_tests.py 25
> UNEXPECTED EXCEPTION:
> Traceback (most recent call last):
> File
>
>
> "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/svntest/testcase.py",
> line 105, in run rc = apply(self.pred.func, args) File
> "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/update_tests.py",
> line 787, in obstructed_update_alters_wc_props file(obstruction_path, 'w')
> NameError: global name 'file' is not defined
> FAIL: update_tests.py 25: obstructed update alters WC properties
>
> The patch below fixes it for me, but I don't understand how the test
> ever worked. Am I the only one seeing this? I'm using Python 2.1.3,
> does this test work on some other version?
>
>
> Index: subversion/tests/clients/cmdline/update_tests.py
> ===================================================================
> --- subversion/tests/clients/cmdline/update_tests.py (revision 14069)
> +++ subversion/tests/clients/cmdline/update_tests.py (working copy)
> @@ -784,7 +784,7 @@
> #print "Creating obstruction"
> obstruction_parent_path = os.path.join(wc_dir, 'A')
> obstruction_path = os.path.join(obstruction_parent_path, 'foo')
> - file(obstruction_path, 'w')
> + svntest.main.file_append(obstruction_path, 'w')
>
> # Update the WC to that newer rev to trigger the obstruction.
> #print "Updating WC"

file() is new in Python 2.3, IIRC.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 9 23:43:34 2005

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.