[Python-checkins] cpython: Issue #20220: Revert time zone test debugging, revision 139c18943d9b
martin.panter
python-checkins at python.org
Mon Nov 16 04:45:28 EST 2015
https://hg.python.org/cpython/rev/039a370d047d
changeset: 99158:039a370d047d
parent: 99155:9c31544d6a66
user: Martin Panter <vadmium+py at gmail.com>
date: Mon Nov 16 09:22:19 2015 +0000
summary:
Issue #20220: Revert time zone test debugging, revision 139c18943d9b
files:
Lib/test/datetimetester.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -2006,16 +2006,7 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list