Message19805
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].
|
|
Date |
User |
Action |
Args |
2007-08-23 14:19:36 | admin | link | issue883604 messages |
2007-08-23 14:19:36 | admin | create | |
|