mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #20220: Revert time zone test debugging, revision 139c18943d9b
This commit is contained in:
parent
51eca24748
commit
fca22327ca
1 changed files with 1 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue