summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-01-02 20:48:22 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-01-02 20:48:22 (GMT)
commite2dc0822941fd81e9db017f85a8475a26c00f952 (patch)
treee4cc5bd4078283d9a9fd2df4c416f57095dc1ee8 /Lib/test
parentece919eb0fd24bcb6fa095049a163ceb96316043 (diff)
downloadcpython-e2dc0822941fd81e9db017f85a8475a26c00f952.zip
cpython-e2dc0822941fd81e9db017f85a8475a26c00f952.tar.gz
cpython-e2dc0822941fd81e9db017f85a8475a26c00f952.tar.bz2
Issue #8013: Fixed time.asctime segfault when OS's asctime fails
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_time.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 600d476..c5e48df 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -122,6 +122,9 @@ 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, ())
+ self.assertRaises(ValueError, time.asctime,
+ (12345, 1, 0, 0, 0, 0, 0, 0, 0))
def test_asctime_bounding_check(self):
self._bounds_checking(time.asctime)