[PATCH][0.13] fixes for test suite

Alexander Belchenko bialix at ukr.net
Tue Nov 21 11:33:40 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There is a bunch of tracebacks in stderr during selftest. All tracebacks
have the same text:

Traceback (most recent call last):
  File "E:\Python24\lib\SocketServer.py", line 222, in handle_request
    self.process_request(request, client_address)
  File "E:\Python24\lib\SocketServer.py", line 241, in process_request
    self.finish_request(request, client_address)
  File "E:\Python24\lib\SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "E:\Python24\lib\SocketServer.py", line 521, in __init__
    self.handle()
  File "E:\Python24\lib\BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
  File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\HttpServer.py", line 82,
in handle_one_request
    method()
  File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\HttpServer.py", line 145,
in do_GET
    path = self.translate_path(self.path)
  File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\HttpServer.py", line 205,
in translate_path
    path = urlparse.urlparse(path)[2]
NameError: global name 'urlparse' is not defined


This is because code that raised error inside block:

if sys.platform == 'win32':

so no one (or at least PQM) actually don't try it.

Attached trivial fix.
Please merge into 0.13.


After applying this patch selftest ends with ugly error:

D:\Bazaar\sandbox\urlparse.for.win32>python bzr --no-plugins selftest -v
> test.log
bzr: ERROR: exceptions.OSError: [Errno 13] Permission denied:
'c:\\docume~1\\modul98\\locals~1\\temp\\testbzrhazke0.log'

Traceback (most recent call last):
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\commands.py", line
626, in run_bzr_catch_errors
    return run_bzr(argv)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\commands.py", line
588, in run_bzr
    ret = run(*run_argv)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\commands.py", line
292, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\builtins.py", line
2149, in run
    bench_history=benchfile)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\tests\__init__.py",
line 1694, in selftest
    bench_history=bench_history)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\tests\__init__.py",
line 1663, in run_suite
    result = runner.run(suite)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\tests\__init__.py",
line 437, in run
    result.printErrors()
  File "E:\Python24\lib\unittest.py", line 667, in printErrors
    self.printErrorList('ERROR', self.errors)
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\tests\__init__.py",
line 273, in printErrorList
    print >>self.stream, test._get_log()
  File "D:\Bazaar\sandbox\urlparse.for.win32\bzrlib\tests\__init__.py",
line 865, in _get_log
    os.remove(self._log_file_name)
OSError: [Errno 13] Permission denied:
'c:\\docume~1\\modul98\\locals~1\\temp\\testbzrhazke0.log'


And resulting test.log file don't have tail with errors summary.

I think this problem should be fixed at least by skipping this sort of
Permission Denied. Guys, it's really hard to run selftest regularly on
win32 because of all this ugly errors!

Alexander








-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYuQUzYr338mxwCURAotvAJ4te4l8uxHTQMXtFrLRUHtA7j/KOACggTx0
aYxQwKzK3X5PkTJ5A5XlD9w=
=VVGi
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32.test.HttpServer.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20061121/27548c0c/attachment.diff 


More information about the bazaar mailing list