Issue 2100: unit test UnicodeWarning (original) (raw)

Issue2100

Created on 2008-02-13 14:21 by JosephArmbruster, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg62358 - (view) Author: Joseph Armbruster (JosephArmbruster) Date: 2008-02-13 14:21
I receive the following warning when running the test_unicode_file unit tests out of the trunk (60758) python -E -tt ../../lib/test/regrtest.py -g "test_unicode_file" test_unicode_file D:\work\pytrunk\lib\test\test_unicode_file.py:103: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal filename1==filename2 D:\work\pytrunk\lib\shutil.py:36: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal os.path.normcase(os.path.abspath(dst))) 1 test OK. It looks like the warning was meant to be suppressed in test_unicode_file.py line 104: # Try using shutil on the filenames. try: filename1==filename2 except UnicodeDecodeError: # these filenames can't be compared - shutil.copy tries to do # just that. This is really a bug in 'shutil' - if one of shutil's # 2 params are Unicode and the other isn't, it should coerce the # string to Unicode with the filesystem encoding before comparison. pass This does not handle the UnicodeWarning, was it meant to?
msg93860 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-10-11 16:01
That try/except no longer exists on trunk. This issue can probably be closed.
msg97099 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-12-31 15:33
Closing as "out of date".
History
Date User Action Args
2022-04-11 14:56:30 admin set github: 46359
2009-12-31 15:33:40 ezio.melotti set status: pending -> closedresolution: out of datemessages: + stage: resolved
2009-10-11 16:01:51 ezio.melotti set status: open -> pendingmessages: +
2009-02-11 04:27:37 ajaksu2 set nosy: + brett.cannon, ezio.melotti
2008-03-18 19:55:16 jafo set priority: normalassignee: mhammondnosy: + mhammond
2008-02-13 14:21:03 JosephArmbruster create