[Python-Dev] More joy with test_strptime (original) (raw)
Tim Peters tim.peters at gmail.com
Mon Jul 12 05:24:28 CEST 2004
- Previous message: [Python-Dev] More joy with test_strptime
- Next message: [Python-Dev] More joy with test_strptime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Tim] ...
So now I'm suspecting that the tricks in PthFile are managing to create a second instance of the time module not related to the instance of the time module teststrptime is monkey-patching with its
time.tzname = (tzname, tzname) time.daylight = 1 tricks.
Using the attached patch yields output
test___all__ test_site test_strptime in strptime ('Eastern Standard Time', 'Eastern Daylight Time') 1 in test_bad_timezone ('Eastern Standard Time', 'Eastern Standard Time') 1 in strptime ('Eastern Standard Time', 'Eastern Daylight Time') 1 ...
so test_strptime's attempt to monkey-patch the time module indeed has no effect on the time module _strptime.py is using.
The problem can be fixed by using this as the first line of test_bad_timezone:
from _strptime import time
But, of course, that's insane.
But if so, I'm at a loss to explain why this would only happen on Windows.
Still so.
Is it the case that teststrptime is only failing on Windows?
Still wondering that.
- Previous message: [Python-Dev] More joy with test_strptime
- Next message: [Python-Dev] More joy with test_strptime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]