[win32] selftest of latest bzr.dev with encodings improvements

Alexander Belchenko bialix at ukr.net
Sat Jun 10 11:09:33 BST 2006


Alexander Belchenko пишет:
> John Arbash Meinel пишет:
>> Alexander Belchenko wrote:
>>> It's very good that encodings work finally lands into main bzr.dev.
>>>
>>> But there is some minor issues with selftest:
>>>
>>> 1) Added new test that invoke external editor and simply wait (it called
>>> something like test_delete_commit_message -- I don't remember exactly).
>>> Because it require of intervention of the user, I think it's prevent to
>>> run selftest in automatic mode. Furthermore, I run selftest in separate
>>> console window and then work on other tasks, because selftest took ~30
>>> min on my machine. So I cannot configure that I need to do something
>>> interactive. I think this test should be invoked explicitly via separate
>>> command or something like 'bzr selftest --interactive-tests' but not in
>>> automatic mode when overall selftest suite running.
>>
>> We definitely should not run any commands that require interaction in
>> the default test suite.
>> I'm not sure why on Linux we don't have this problem, but if you can
>> give the exact test which is hanging, we will definitely fix that.
> 
> This test named 
> test_msgeditor.MsgEditorTest.test_deleted_commit_message. And this test 
> every time invoke external editor (that pointed in my $EDITOR 
> environment variable).

Actually problem in bzrlib.msgeditor._run_editor:

         try:
             x = call(edargs + [filename])
         except OSError, e:
            # We're searching for an editor, so catch safe errors and 
continue
            if e.errno in (errno.ENOENT, ):
                continue

When mentioned test try to run 'del' command on windows it got error 
errno.ENOENT and it fall down to the next editor. Probably edited file 
was not properly closed before it passed to _run_editor, so it cannot be 
deleted on windows (because windows cannot do unlink for file-in-use).

--
Alexander





More information about the bazaar mailing list