Commit 3e913c9e authored by Alexander Belopolsky's avatar Alexander Belopolsky

Issue #8013: Fixed test

parent e1bc8982
......@@ -123,8 +123,15 @@ class TimeTestCase(unittest.TestCase):
time.asctime(time.gmtime(self.t))
self.assertRaises(TypeError, time.asctime, 0)
self.assertRaises(TypeError, time.asctime, ())
self.assertRaises(ValueError, time.asctime,
(12345, 1, 0, 0, 0, 0, 0, 0, 0))
# XXX: Posix compiant asctime should refuse to convert
# year > 9999, but Linux implementation does not.
# self.assertRaises(ValueError, time.asctime,
# (12345, 1, 0, 0, 0, 0, 0, 0, 0))
# XXX: For now, just make sure we don't have a crash:
try:
time.asctime((12345, 1, 0, 0, 0, 0, 0, 0, 0))
except ValueError:
pass
def test_asctime_bounding_check(self):
self._bounds_checking(time.asctime)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment