classification
Title: unit test UnicodeWarning
Type: behavior Stage: resolved
Components: Tests Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: mhammond Nosy List: JosephArmbruster, brett.cannon, ezio.melotti, mhammond
Priority: normal Keywords:

Created on 2008-02-13 14:21 by JosephArmbruster, last changed 2009-12-31 15:33 by ezio.melotti. 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
2009-12-31 15:33:40ezio.melottisetstatus: pending -> closed
resolution: out of date
messages: + msg97099

stage: resolved
2009-10-11 16:01:51ezio.melottisetstatus: open -> pending

messages: + msg93860
2009-02-11 04:27:37ajaksu2setnosy: + brett.cannon, ezio.melotti
2008-03-18 19:55:16jafosetpriority: normal
assignee: mhammond
nosy: + mhammond
2008-02-13 14:21:03JosephArmbrustercreate