diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-11-16 09:22:19 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-11-16 09:22:19 (GMT) |
commit | fca22327ca9086a17902b3a21f2b8af45f7a4892 (patch) | |
tree | c549e1b6676119b413cfc567f0791ab66fb6f0fb /Lib/test/datetimetester.py | |
parent | 51eca24748dda525373806e7537258133db635ef (diff) | |
download | cpython-fca22327ca9086a17902b3a21f2b8af45f7a4892.zip cpython-fca22327ca9086a17902b3a21f2b8af45f7a4892.tar.gz cpython-fca22327ca9086a17902b3a21f2b8af45f7a4892.tar.bz2 |
Issue #20220: Revert time zone test debugging, revision 139c18943d9b
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r-- | Lib/test/datetimetester.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index f814f23..7374608 100644 --- 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: - dt = strptime(dtstr, "%z %Z") - except ValueError: - import os - self.fail( - "Issue #25168 strptime() failure info:\n" - f"_TimeRE_cache['Z']={_strptime._TimeRE_cache['Z']!r}\n" - f"TZ={os.environ.get('TZ')!r}, or {os.getenv('TZ')!r} via getenv()\n" - f"_regex_cache={_strptime._regex_cache!r}\n" - ) + dt = strptime(dtstr, "%z %Z") self.assertEqual(dt.utcoffset(), timedelta(seconds=tzseconds)) self.assertEqual(dt.tzname(), tzname) # Can produce inconsistent datetime |