summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-01-02 23:09:41 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-01-02 23:09:41 (GMT)
commitd4bf48bbb3d8aa63e48abafff44928468f593221 (patch)
tree9b0fed58e3fae4f22dc6f32ab28ded6fb60e5207 /Lib/test/test_time.py
parented3baf35c3159381afccf81af4f1e58abb634adb (diff)
downloadcpython-d4bf48bbb3d8aa63e48abafff44928468f593221.zip
cpython-d4bf48bbb3d8aa63e48abafff44928468f593221.tar.gz
cpython-d4bf48bbb3d8aa63e48abafff44928468f593221.tar.bz2
Merged revisions 87648,87656 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87648 | alexander.belopolsky | 2011-01-02 15:48:22 -0500 (Sun, 02 Jan 2011) | 1 line Issue #8013: Fixed time.asctime segfault when OS's asctime fails ........ r87656 | alexander.belopolsky | 2011-01-02 17:16:10 -0500 (Sun, 02 Jan 2011) | 1 line Issue #8013: Fixed test ........
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")