cpython: 5b1e1967ea9d (original) (raw)
--- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -161,10 +161,6 @@ class TimeTestCase(unittest.TestCase): self.fail("conversion specifier %r failed with '%s' input." % (format, strf_output))
XXX Temporary tests to troubleshoot issue #13309 on buildbots
- test_maa_strptime = test_strptime
- test_mzz_strptime = test_strptime
- def test_strptime_bytes(self): # Make sure only strings are accepted as arguments to strptime. self.assertRaises(TypeError, time.strptime, b'2009', "%Y") @@ -301,7 +297,8 @@ class TimeTestCase(unittest.TestCase): t1 = time.mktime(lt1) self.assertAlmostEqual(t1, t0, delta=0.2)
XXX run last to work around issue #13309 on Gentoo
- def test_ZZZ_mktime(self): # Issue #1726687 for t in (-2, -1, 0, 1): try:
@@ -310,8 +307,9 @@ class TimeTestCase(unittest.TestCase): pass else: self.assertEqual(time.mktime(tt), t)
self.assertNotEqual(time.strftime('%Z', time.gmtime(self.t)), 'LMT',[](#l1.28)
"strftime bug after processing t = %s" % t)[](#l1.29)
tt = time.gmtime(self.t)[](#l1.30)
tzname = time.strftime('%Z', tt)[](#l1.31)
self.assertNotEqual(tzname, 'LMT')[](#l1.32) # It may not be possible to reliably make mktime return error[](#l1.33) # on all platfom. This will make sure that no other exception[](#l1.34) # than OverflowError is raised for an extreme value.[](#l1.35)
@@ -319,6 +317,10 @@ class TimeTestCase(unittest.TestCase): time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1)) except OverflowError: pass
msg = "Issue #13309: the '%Z' specifier reports wrong timezone"[](#l1.40)
self.assertEqual(time.strftime('%Z', tt), tzname, msg)[](#l1.41)
tt = time.gmtime(self.t)[](#l1.42)
self.assertEqual(time.strftime('%Z', tt), tzname, msg)[](#l1.43)