Don't use shutil.move instead of osutils.rename
John A Meinel
john at arbash-meinel.com
Fri Dec 2 22:19:05 GMT 2005
Alexander Belchenko wrote:
> John A Meinel пишет:
>> Have you had a chance to try my latest win32 branch? I fixed everything
>> so that all of the tests pass, though now it reports everything with
>> forward slashes. (And I haven't worked around the executable bit yet).
>>
>> I would be happy to hear your feedback on the subject.
>
> Well, I'm just pulling your win32 branch and start to test it.
>
> I have 1 failing tests:
>
> ======================================================================
> ERROR: test_returns_output (bzrlib.tests.test_gpg.TestCommandLine)
>
> log from this test:
>
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "E:\work\Python\bzr\win32-meinel-20051202\bzrlib\tests\test_gpg.py",
> line 52, in test_returns_output
> my_gpg.sign("some content\nwith newlines\n"))
> File "E:\work\Python\bzr\win32-meinel-20051202\bzrlib\gpg.py", line
> 77, in sign
> raise errors.SigningFailed(self._command_line())
> SigningFailed: Failed to gpg sign data with command '['cat', '-']'
>
> ----------------------------------------------------------------------
> Ran 526 tests in 84.219s
>
> FAILED (errors=1)
> ======================================================================
>
> This test fails because on my machine does not have `cat` utility. Do
> you can suggest me where I can download win32 port of `cat`?
Is that the only test which fails?
We shouldn't specifically depend on cat. Otherwise I could certainly
post a mingw version, which should be good enough.
All it is testing is that it can spawn a sub-process. I'm thinking we
can do it in a different way.
I just switched it to use:
python -c "import sys; sys.stdout.write(sys.stdin.read())"
Which should be exactly what we need from 'cat'
Since bzrlib is python program, we certainly should have a python
interpreter available.
It turns out we need an ugly fix, though.
In python sys.stdout is defaulted to open in text mode on windows. So we
need to do this:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443
That's a little bit uglier than I would really like.
So I'm modifying the test to run slightly differently under win32.
Now you have to have python in your path, but you probably need it
anyway in order to be running bzr.
Can you try again? revno 1374+1375 should have fixed your problem.
John
=:->
>
> Alexander
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051202/79b76d9a/attachment.pgp
More information about the bazaar
mailing list