[Bug and regression] selftest output has no encoding
Alexander Belchenko
bialix at ukr.net
Wed Dec 20 17:21:52 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Today I have this traceback during selftest:
D:\Bazaar\sandbox\bzr.dev>python bzr --no-plugins selftest test_access_normalized
bzr: D:/Bazaar/sandbox/bzr.dev/bzr
bzrlib: D:\Bazaar\sandbox\bzr.dev\bzrlib
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 12: ordinal not in
range(128
)
Traceback (most recent call last):
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 650, in run_bzr_catch_errors
return run_bzr(argv)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 612, in run_bzr
ret = run(*run_argv)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 304, in run_argv_aliases
return self.run(**all_cmd_args)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\builtins.py", line 2136, in run
bench_history=benchfile)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\__init__.py", line 1713, in selftest
bench_history=bench_history)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\__init__.py", line 1682, in run_suite
result = runner.run(suite)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\__init__.py", line 439, in run
test.run(result)
File "E:\Python24\lib\unittest.py", line 424, in run
test(result)
File "E:\Python24\lib\unittest.py", line 281, in __call__
return self.run(*args, **kwds)
File "E:\Python24\lib\unittest.py", line 263, in run
result.addFailure(self, self.__exc_info())
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\__init__.py", line 239, in addFailure
self.report_failure(test, err)
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\__init__.py", line 338, in report_failure
err[1],
File "D:\Bazaar\sandbox\bzr.dev\bzrlib\progress.py", line 197, in note
self.to_messages_file.write(fmt_string % args)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 12: ordinal not in range(128)
bzr 0.14.0dev0 on python 2.4.4.final.0 (win32)
arguments: ['bzr', '--no-plugins', 'selftest', 'test_access_normalized']
** please send this report to bazaar-ng at lists.ubuntu.com
D:\Bazaar\sandbox\bzr.dev>python bzr revno
2204
This is the regression, because mentioned test don't fails before.
Quirk of fate: this regression introduced by my change in revision 2198:
- ------------------------------------------------------------
revno: 2198
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2006-12-19 07:40:19 +0000
message:
(bialix) selftest internals: by default build tree for test with
binary line-endings
------------------------------------------------------------
revno: 2193.2.1
merged: bialix at ukr.net-20061218114121-0vqi3or3er7e87li
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: selftest.fixes
timestamp: Mon 2006-12-18 13:41:21 +0200
message:
selftest: build tree for test with binary line-endings by default
- ----------------------------------------------------------------
Mea ultima culpa.
But this regression helps to see another bug, so my offence was useful.
The root of traceback really in
test_nonascii.NormalizedFilename.test_access_normalized,
because of this code:
self.assertEqual(shouldbe, actual,
'contents of %s is incorrect: %r != %r'
% (path, shouldbe, actual))
Look at '%s' -> it's a problem because path is unicode.
but I think selftest *should* have valid encoding, not ascii.
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFiXEwzYr338mxwCURAub9AJ9zYMGPHZP7axA7cEAh7AH1C43jRQCZAWVo
p4B5uZ5DxLzNcI0G5YNfvzk=
=dub2
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list