[Python-Dev] RE: test_unicode_file failing on trunk, Win98SE

Tim Peters tim.one at comcast.net
Thu Dec 4 00:26:07 EST 2003

[Mark Hammond]
> My apologies - I have fixed it (I hope! No Win98 SE here for me to
> test on)

Not yet, but we may be getting closer <wink>.

First problem:  test_support.py did


on Win98SE, but test_unicode_filename.py tries to import


That's a clear spelling mistake in the former, so I'll fix that and check it

Second problem:  Then the test gets one failure:

ERROR: test_single_files (__main__.TestUnicodeFiles)
Traceback (most recent call last):
  File "../lib/test/test_unicode_file.py", line 142, in test_single_files
  File "../lib/test/test_unicode_file.py", line 116, in _test_single
  File "../lib/test/test_unicode_file.py", line 32, in _do_single
    os.utime(filename, None)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-7:
ordinal not in range(128)

Note that the test doesn't skip itself on 98SE, because the

except (UnicodeError, TypeError):
    # Either the file system encoding is None, or the file name
    # cannot be encoded in the file system encoding.
    raise TestSkipped("No Unicode filesystem semantics on this platform.")

doesn't trigger:

>>> import sys
>>> sys.getfilesystemencoding()
>>> u'@test-\xe0\xf2'.encode('mbcs')

>> Don't know about 2.3 maint, & can't test that today:

> The fix to posixmodule was checked into both head and 2.3-maint, but
> the test suite changes were only made to head - for exactly this
> reason <wink>. Thus, 2.3 should be fine.

Yes, 2.3 maint *is* fine on 98SE.  All the above was about the trunk.

More information about the Python-Dev mailing list