Re: autoprop_tests.py is creating mangled test files on my system
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-10-03 04:42:47 CEST
Julian Foad wrote:
> fd = open(os.path.join(dir, name), 'w', 0644)
> 00000000 88 84 09 08 7c ba 38 40 62 61 7a 0a |....|º8@baz.|
The third argument to 'open', at least in my version of Python, is the buffer size to use (or 1 which means line buffering). "pydoc open" doesn't say what the units of this buffer size are, or whether there are any limits, but a quick experiment finds that some sizes work and other sizes produce this corruption.
So a fix is to remove the third argument. That is enough of a fix for me and us, though it doesn't cure the root of the problem.
Patch below. Can a Python expert verify this? I'll check it in soon anyway, as I think the change is uncontroversial. If my analysis in the log message is wrong I can correct it later.
- Julian
Fix an error in the regression tests for auto-props. The error is harmless in
(The bug is that on some installations of Python, open(filename, 'w', buf_size)
* subversion/tests/clients/cmdline/autoprop_tests.py
Index: subversion/tests/clients/cmdline/autoprop_tests.py
---------------------------------------------------------------------
|
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.