Skip to content

Commit 4a99d19

Browse files
author
Alexander Smishlajev
committed
test invalid tuple handling
1 parent 414e73c commit 4a99d19

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_dates.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_dates.py,v 1.35 2004-11-29 14:34:10 a1s Exp $
18+
# $Id: test_dates.py,v 1.35.2.1 2005-02-25 17:24:53 a1s Exp $
1919
from __future__ import nested_scopes
2020

2121
import unittest, time
@@ -62,6 +62,8 @@ def testDate(self):
6262

6363
def testDateError(self):
6464
self.assertRaises(ValueError, Date, "12")
65+
# Date cannot handle dates before UNIX epoch
66+
self.assertRaises(ValueError, Date, (1, 1, 1, 0, 0, 0.0, 0, 1, -1))
6567

6668
def testOffset(self):
6769
ae = self.assertEqual
@@ -390,4 +392,4 @@ def test_suite():
390392
runner = unittest.TextTestRunner()
391393
unittest.main(testRunner=runner)
392394

393-
# vim: set filetype=python ts=4 sw=4 et si :
395+
# vim: set filetype=python sts=4 sw=4 et si :

0 commit comments

Comments
 (0)