[issue20220] test_datetime, test_tarfile, test_strptime time zone failures

Martin Panter report at bugs.python.org
Sat Nov 14 20:22:27 EST 2015


Martin Panter added the comment:

I added test_strptime to the title due to Issue 22795, but Antoine’s trick doesn’t seem to help reproduce it. In this run <http://buildbot.python.org/all/builders/s390x%20RHEL%203.4/builds/173/steps/test/logs/stdio> all three failed:

[158/390] test_imaplib
[171/390] test_strptime

======================================================================
ERROR: test_bad_timezone (test.test_strptime.StrptimeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.4.edelsohn-rhel-z/build/Lib/test/test_strptime.py", line 332, in test_bad_timezone
    tz_value = _strptime._strptime_time(tz_name, "%Z")[8]
  File "/home/dje/cpython-buildarea/3.4.edelsohn-rhel-z/build/Lib/_strptime.py", line 494, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "/home/dje/cpython-buildarea/3.4.edelsohn-rhel-z/build/Lib/_strptime.py", line 337, in _strptime
    (data_string, format))
ValueError: time data 'STD' does not match format '%Z'

======================================================================
ERROR: test_timezone (test.test_strptime.StrptimeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.4.edelsohn-rhel-z/build/Lib/test/test_strptime.py", line 310, in test_timezone
    strp_output = _strptime._strptime_time(strf_output, "%Z")
  File "/home/dje/cpython-buildarea/3.4.edelsohn-rhel-z/build/Lib/_strptime.py", line 494, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "/home/dje/cpython-buildarea/3.4.edelsohn-rhel-z/build/Lib/_strptime.py", line 337, in _strptime
    (data_string, format))
ValueError: time data 'STD' does not match format '%Z'

----------------------------------------------------------------------
Ran 48 tests in 0.067s

FAILED (errors=2)
test test_strptime failed
[192/390/1] test_tarfile
test_list_command_verbose (test.test_tarfile.CommandLineTest) ... FAIL
[389/390/2] test_datetime
test_strptime (test.datetimetester.TestDateTime_Fast) ... ERROR
test_strptime (test.datetimetester.TestDateTimeTZ_Fast) ... ERROR
test_strptime (test.datetimetester.TestSubclassDateTime_Fast) ... ERROR

Here is a patch that adds DST rules. I think it should work around the problem at least for test_datetime and test_tarfile.

----------
keywords: +patch
Added file: http://bugs.python.org/file41047/tz-rules.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20220>
_______________________________________


More information about the Python-bugs-list mailing list