Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test UnicodeWarning #46359

Closed
JosephArmbruster mannequin opened this issue Feb 13, 2008 · 3 comments
Closed

unit test UnicodeWarning #46359

JosephArmbruster mannequin opened this issue Feb 13, 2008 · 3 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@JosephArmbruster
Copy link
Mannequin

JosephArmbruster mannequin commented Feb 13, 2008

BPO 2100
Nosy @mhammond, @brettcannon, @ezio-melotti

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/mhammond'
closed_at = <Date 2009-12-31.15:33:40.831>
created_at = <Date 2008-02-13.14:21:03.864>
labels = ['type-bug', 'tests']
title = 'unit test UnicodeWarning'
updated_at = <Date 2009-12-31.15:33:40.829>
user = 'https://bugs.python.org/JosephArmbruster'

bugs.python.org fields:

activity = <Date 2009-12-31.15:33:40.829>
actor = 'ezio.melotti'
assignee = 'mhammond'
closed = True
closed_date = <Date 2009-12-31.15:33:40.831>
closer = 'ezio.melotti'
components = ['Tests']
creation = <Date 2008-02-13.14:21:03.864>
creator = 'JosephArmbruster'
dependencies = []
files = []
hgrepos = []
issue_num = 2100
keywords = []
message_count = 3.0
messages = ['62358', '93860', '97099']
nosy_count = 4.0
nosy_names = ['mhammond', 'brett.cannon', 'JosephArmbruster', 'ezio.melotti']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue2100'
versions = ['Python 2.6']

@JosephArmbruster
Copy link
Mannequin Author

JosephArmbruster mannequin commented Feb 13, 2008

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?

@JosephArmbruster JosephArmbruster mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Feb 13, 2008
@jafo jafo mannequin assigned mhammond Mar 18, 2008
@ezio-melotti
Copy link
Member

That try/except no longer exists on trunk. This issue can probably be
closed.

@ezio-melotti
Copy link
Member

Closing as "out of date".

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants