Issue 989338: test_unicode_file fails on win2k (original) (raw)

Issue989338

Created on 2004-07-12 11:11 by tebeka, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (18)
msg21530 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-07-12 11:11
>>> test_support.verbose = 1 >>> test_unicode_file.test_main() test_directories (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_single_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR ====================================================================== ERROR: test_directories (test.test_unicode_file.TestUnicodeFiles) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\apps\Python24\lib\test\test_unicode_file.py", line 178, in test_directories self._do_directory(TESTFN_ENCODED+ext, TESTFN_ENCODED+ext, True) File "C:\apps\Python24\lib\test\test_unicode_file.py", line 112, in _do_directory os.mkdir(make_name) OSError: [Errno 22] Invalid argument: '@test-??.dir' ====================================================================== ERROR: test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\apps\Python24\lib\test\test_unicode_file.py", line 170, in test_equivalent_files self._test_equivalent(TESTFN_ENCODED, TESTFN_UNICODE) File "C:\apps\Python24\lib\test\test_unicode_file.py", line 154, in _test_equivalent f = file(filename1, "w") IOError: [Errno 2] No such file or directory: '@test-??' ====================================================================== ERROR: test_single_files (test.test_unicode_file.TestUnicodeFiles) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\apps\Python24\lib\test\test_unicode_file.py", line 164, in test_single_files self._test_single(TESTFN_ENCODED) File "C:\apps\Python24\lib\test\test_unicode_file.py", line 136, in _test_single f = file(filename, "w") IOError: [Errno 2] No such file or directory: '@test-??' ---------------------------------------------------------------------- Ran 3 tests in 0.061s FAILED (errors=3) Traceback (most recent call last): File "<pyshell#21>", line 1, in -toplevel- test_unicode_file.test_main() File "C:\apps\Python24\lib\test\test_unicode_file.py", line 191, in test_main run_suite(suite) File "C:\apps\Python24\lib\test\test_support.py", line 274, in run_suite raise TestFailed(msg) TestFailed: errors occurred; run in verbose mode for details >>> This is Python2.4a1 on win2k pro
msg21531 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-07-12 16:35
Logged In: YES user_id=31435 Peculiar -- it works fine on WinXP Pro, which ought to work the same as Win2K here.
msg21532 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-07-13 06:10
Logged In: YES user_id=358087 Sorry, I forgot I've upgraded my OS lately. This *is* WinXP Pro. Any other data I can send?
msg21533 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-07-15 16:55
Logged In: YES user_id=21627 Are you using a FAT partition? What precise version string do you get in winver.exe?
msg21534 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-07-18 06:44
Logged In: YES user_id=358087 File system is NTFS. winver gives: Version 5.1 (Build 2600.xpsp2.030422-1633: Service Pack 1)
msg21535 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-09-07 06:31
Logged In: YES user_id=80475 Does this still fail for you in Py2.4a3 ? If not, please note the result and close the bug.
msg21536 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-09-07 06:56
Logged In: YES user_id=358087 Yes it does :-( I have a winXP on IBM T-40. The other language that is installed is Hebrew. The problem that when encoding TESTFN_UNICODE with the file system ecoding (mbcs) the resulted string is "@test-??" which is not a legal file name on windows
msg21537 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2004-09-07 14:37
Logged In: YES user_id=671362 I can reproduce this in Python 2.4a3 on Win 2K SP4(locale is set to Japanese). File system is NTFS. But on my box, test_single_files passes OK. Only test_equivalent_files and test_directories raise ERROR. Here is the result. test_unicode_file test_directories (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_single_files (test.test_unicode_file.TestUnicodeFiles) ... ok ============================================== ======================== ERROR: test_directories (test.test_unicode_file.TestUnicodeFiles) ------------------------------------------------------------ ---------- Traceback (most recent call last): File "C:\Python24\lib\test\test_unicode_file.py", line 185, in test_directories self._do_directory(TESTFN_ENCODED+ext, TESTFN_UNICODE+ext, True) File "C:\Python24\lib\test\test_unicode_file.py", line 114, in _do_directory os.chdir(chdir_name) OSError: [Errno 2] No such file or directory: u'@test-\xe0 \xf2.dir' ============================================== ======================== ERROR: test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ------------------------------------------------------------ ---------- Traceback (most recent call last): File "C:\Python24\lib\test\test_unicode_file.py", line 176, in test_equivalent_files self._test_equivalent(TESTFN_ENCODED, TESTFN_UNICODE) File "C:\Python24\lib\test\test_unicode_file.py", line 157, in _test_equivalent self._do_equivilent(filename1, filename2) File "C:\Python24\lib\test\test_unicode_file.py", line 67, in _do_equivilent os.stat(filename2)) OSError: [Errno 2] No such file or directory: u'@test-\xe0\xf2' ------------------------------------------------------------ ---------- Ran 3 tests in 0.070s FAILED (errors=2) test test_unicode_file failed -- errors occurred; run in verbose mode for details 1 test failed: test_unicode_file
msg21538 - (view) Author: Marek Baczynski (imbaczek) Date: 2004-09-16 23:30
Logged In: YES user_id=838849 I have the very same errors as quiver on WinXP SP1, Python 2.4a3, NTFS, locale Polish.
msg21539 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-10-13 15:31
Logged In: YES user_id=29957 Sounds like a locale thing - do the people seeing the bug have the problem if they switch their locale to english?
msg21540 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-10-14 08:59
Logged In: YES user_id=358087 How do I switch my locale to English on winXP pro?
msg21541 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-10-15 06:14
Logged In: YES user_id=21627 In control panel/regional settings, change the first *and* the third tab to English. This requires a reboot. The failure itself is harmless. test_support assumes that TESTFN_UNICODE = unicode("@test-\xe0\xf2", "latin-1") is a filename that can be represented in the default file encoding. On Windows, if the default file encoding is not CP-1252 (as it is in the Western European installations), this file name cannot be represented correctly in "mbcs". To fix this, we would need to come up with procedure to generate a file name depending on the locale. Unfortunately, such a procedure is very difficult to implement.
msg21542 - (view) Author: Grzegorz Makarewicz (makaron) Date: 2004-11-02 17:28
Logged In: YES user_id=115179 same effect on non french w2k (polish locale), this persists on any python 2.x version and is rather independent from windows version - in my case it is w2k pro sp4. file created with this encoding works fine with windows commander - if that matters
msg21543 - (view) Author: Grzegorz Makarewicz (makaron) Date: 2004-11-03 08:23
Logged In: YES user_id=115179 Martin, on other w2k pro (english) sp4 with POLISH locale set this test works as expected - "All the Unicode tests appeared to work". Both versions have the same settings for regional options - polish: On first tab (general) I have Polish location and other languages on the same tab selected: western europe and US, central europe. On last tab (6 = input locales) I have polish programmers and endglish (US). Third tab - currency ? Or this test fails on non english versions of W2K ? German ? Hungarian ? ...
msg21544 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-11-07 10:12
Logged In: YES user_id=21627 I'm talking about the third tab on XP regional settings; I don't know how the user interface looks in W2k. This tab says something like "language for programs which don't support Unicode". It might be that this setting is simply not available on W2k.
msg21545 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-11-07 19:58
Logged In: YES user_id=21627 This is now fixed in test_unicode_file.py 1.16.
msg21546 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2005-01-27 21:16
Logged In: YES user_id=671362 Can anyone merge this(test_unicode_file.py rev 1.16) to release23-maint branch? This is not specific to Python 2.4.
msg21547 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-01-30 22:56
Logged In: YES user_id=21627 No. A release candidate for 2.3.5 was already made; at this point, test cases should not be changed anymore. As 2.3.5 will be the last 2.3 release, backporting the change *after* 2.3.5 is pointless.
History
Date User Action Args
2022-04-11 14:56:05 admin set github: 40548
2004-07-12 11:11:19 tebeka create