You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/04/09 21:12:29 UTC
update_tests.py:obstructed_update_alters_wc_props broken?
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"
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: update_tests.py:obstructed_update_alters_wc_props broken?
Posted by Branko Čibej <br...@xbc.nu>.
Bastian Blank wrote:
>On Sat, Apr 09, 2005 at 10:42:35PM +0100, Max Bowsher wrote:
>
>
>>file() is new in Python 2.3, IIRC.
>>
>>
>
>No, 2.2.
>
>
Then let's please throw it out, mz automatic tests are choking on it,
too. We require 2.0, IIRC.
--
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: update_tests.py:obstructed_update_alters_wc_props broken?
Posted by Bastian Blank <ba...@waldi.eu.org>.
On Sat, Apr 09, 2005 at 10:42:35PM +0100, Max Bowsher wrote:
> file() is new in Python 2.3, IIRC.
No, 2.2.
Bastian
--
I'm a soldier, not a diplomat. I can only tell the truth.
-- Kirk, "Errand of Mercy", stardate 3198.9
Re: update_tests.py:obstructed_update_alters_wc_props broken?
Posted by Max Bowsher <ma...@ukf.net>.
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