[Python-Dev] More joy with test_strptime
Tim Peters
tim.peters at gmail.com
Mon Jul 12 05:25:22 CEST 2004
Forgot the debug-output patch; attached.
-------------- next part --------------
Index: Lib/_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v
retrieving revision 1.32
diff -c -u -r1.32 _strptime.py
--- Lib/_strptime.py 4 May 2004 09:21:43 -0000 1.32
+++ Lib/_strptime.py 12 Jul 2004 03:16:43 -0000
@@ -272,6 +272,8 @@
def strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
"""Return a time struct based on the input string and the format string."""
global _TimeRE_cache
+ import sys
+ print >> sys.stderr, "in strptime", time.tzname, time.daylight
_cache_lock.acquire()
try:
time_re = _TimeRE_cache
Index: Lib/test/test_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v
retrieving revision 1.24
diff -c -u -r1.24 test_strptime.py
--- Lib/test/test_strptime.py 16 Nov 2003 16:17:48 -0000 1.24
+++ Lib/test/test_strptime.py 12 Jul 2004 03:16:44 -0000
@@ -285,6 +285,7 @@
original_daylight = time.daylight
time.tzname = (tz_name, tz_name)
time.daylight = 1
+ print >> sys.stderr, "in test_bad_timezone", time.tzname, time.daylight
tz_value = _strptime.strptime(tz_name, "%Z")[8]
self.failUnlessEqual(tz_value, -1)
finally:
More information about the Python-Dev
mailing list