test_nonascii: two unicode a's

Alexander Belchenko bialix at ukr.net
Sun Jul 2 12:50:44 BST 2006


Alexander Belchenko пишет:
> Alexander Belchenko пишет:
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File 
>> "E:\work\MyCode\bzr\devel\jam.win32\bzrlib\tests\test_nonascii.py", 
>> line 80, in test_platform
>>     self.assertEqual(expected, present)
>> AssertionError: [u'\xe4', u'\xe5', u'\u017d'] != [u'\xe4', u'\u017d']
> 
> 
> I'm very surprised why another test is passed: 
> test_nonascii.UnicodeFilename.test_access
> 
> I'm run selftest with --keep-output to look into test directories. And 
> this is *funniest* thing ever! In directory actually 2 files instead of 
> 3. And test_access *passing*. Yes-yes-yes: it passing.

Attached diff provide check of files content so now test is failing.

======================================================================
FAIL: test_access (bzrlib.tests.test_nonascii.UnicodeFilename)

vvvv[log from 
bzrlib.tests.test_nonascii.UnicodeFilename.test_access]---------
converting os path '.' => url 
file:///E:/work/MyCode/bzr/devel/jam.win32/test0003.tmp/test_nonascii.UnicodeFilename.test_access

^^^^[log from 
bzrlib.tests.test_nonascii.UnicodeFilename.test_access]---------
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"E:\work\MyCode\bzr\devel\jam.win32\bzrlib\tests\test_nonascii.py", line 
94, in test_access
     self.assertEqual(shouldbe, actual, ('content of file %r is wrong '
AssertionError: content of file u'\xe5' is wrong ('contents of 
\xc3\xa5\r\n' != 'contents of \xc3\xa4\r\n')


But anyway something wrong with selftest itself. Selftest does not print 
full log for this tests if it running in batch. But prints full log when 
it runs alone.

--
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_nonascii.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060702/8716adbd/attachment.diff 


More information about the bazaar mailing list