cpython: 039a370d047d (original) (raw)
Mercurial > cpython
changeset 99158:039a370d047d
Issue #20220: Revert time zone test debugging, revision 139c18943d9b [#20220]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Mon, 16 Nov 2015 09:22:19 +0000 |
parents | 9c31544d6a66 |
children | 007235e65603 |
files | Lib/test/datetimetester.py |
diffstat | 1 files changed, 1 insertions(+), 10 deletions(-)[+] [-] Lib/test/datetimetester.py 11 |
line wrap: on
line diff
--- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -2006,16 +2006,7 @@ class TestDateTime(TestDate): seconds = tzseconds hours, minutes = divmod(seconds//60, 60) dtstr = "{}{:02d}{:02d} {}".format(sign, hours, minutes, tzname)
try:[](#l1.7)
dt = strptime(dtstr, "%z %Z")[](#l1.8)
except ValueError:[](#l1.9)
import os[](#l1.10)
self.fail([](#l1.11)
"Issue #25168 strptime() failure info:\n"[](#l1.12)
f"_TimeRE_cache['Z']={_strptime._TimeRE_cache['Z']!r}\n"[](#l1.13)
f"TZ={os.environ.get('TZ')!r}, or {os.getenv('TZ')!r} via getenv()\n"[](#l1.14)
f"_regex_cache={_strptime._regex_cache!r}\n"[](#l1.15)
)[](#l1.16)
dt = strptime(dtstr, "%z %Z")[](#l1.17) self.assertEqual(dt.utcoffset(), timedelta(seconds=tzseconds))[](#l1.18) self.assertEqual(dt.tzname(), tzname)[](#l1.19) # Can produce inconsistent datetime[](#l1.20)