summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r--Lib/test/test_time.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index eb4289f..0b029d6 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -124,6 +124,16 @@ class TimeTestCase(unittest.TestCase):
def test_asctime(self):
time.asctime(time.gmtime(self.t))
self.assertRaises(TypeError, time.asctime, 0)
+ self.assertRaises(TypeError, time.asctime, ())
+ # 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
@unittest.skipIf(not hasattr(time, "tzset"),
"time module has no attribute tzset")