[ python-Bugs-883604 ] locale specific problem in test_strftime.py
SourceForge.net
noreply at sourceforge.net
Sat Jan 24 08:21:27 EST 2004
Bugs item #883604, was opened at 2004-01-24 22:21
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=883604&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: George Yoshida (quiver)
Assigned to: Nobody/Anonymous (nobody)
Summary: locale specific problem in test_strftime.py
Initial Comment:
test/test_strftime.py compares an expectation and a
result by regular expressions, but the pattern isn't
escaped. So if the expectation includes a metacharacter,
expectation == result
and
re.match(expectation, result)
do not always return the same value.
In my case on Japanese Windows, time.tzname returns
('\x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)', '\x93
\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)')
The output contains parentheses.
This resuls in a message:
Conflict for nonstandard '%Z' format (time zone name):
Expected (W), but got (W)
re.match(foo, bar) != (foo == bar)
One workaround I can think of is changing re.match(e
[1], result) back to result == e[1].
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=883604&group_id=5470
More information about the Python-bugs-list
mailing list