[Python-Dev] test_unicode_file fails on Linux (original) (raw)

Mark Hammond mhammond at skippinet.com.au
Tue Jan 6 03:22:52 EST 2004


The utime() call is failing for one of the Unicode file names.

build> ./python ../Lib/test/testunicodefile.py testdirectories (main.TestUnicodeFiles) ... ok testequivalentfiles (main.TestUnicodeFiles) ... ok testsinglefiles (main.TestUnicodeFiles) ... '@test-\xc3\xa0\xc3\xb2' '@test-\xc3\xa0\xc3\xb2' u'@test-\xe0\xf2' ERROR

By default, this test is working for me on Linux. I suspect it has to do with the fact that:

[skip at bobcat build]$ ./python -c 'import sys;print sys.getfilesystemencoding()' UTF-8

By way of testing, I tried: [skip at bobcat build]$ export LANG=de_DE [skip at bobcat build]$ ./python -c 'import sys;print sys.getfilesystemencoding()' ISO-8859-1

And the tests still succeeded. Trying to work with "ascii" as the encoding results in a 'TestSkipped' exception:

[skip at bobcat build]$ export LANG=C [skip at bobcat build]$ ./python -c 'import sys;print sys.getfilesystemencoding()' ANSI_X3.4-1968 [skip at bobcat build]$ ./python ../Lib/test/test_unicode_file.py ... test.test_support.TestSkipped: No Unicode filesystem semantics on this platform.

I even managed to get my Windows 98 box on the network again, and this also seems to work for me from current CVS. I'm really not sure what I am missing....

Mark.



More information about the Python-Dev mailing list