mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #8013: Fixed time.asctime segfault when OS's asctime fails
This commit is contained in:
parent
ece919eb0f
commit
e2dc082294
2 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue