diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-01-08 00:13:34 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-01-08 00:13:34 (GMT) |
commit | b8bb4664fc8cb833f0fd50c9dac4f6c3be032784 (patch) | |
tree | 1b02d0fbb69e4849a2f4e0c48d7f33fa088b0bd0 /Lib/test/datetimetester.py | |
parent | 9253214fd9fe22b8b2b4ca5bb28952df8cab3e8c (diff) | |
download | cpython-b8bb4664fc8cb833f0fd50c9dac4f6c3be032784.zip cpython-b8bb4664fc8cb833f0fd50c9dac4f6c3be032784.tar.gz cpython-b8bb4664fc8cb833f0fd50c9dac4f6c3be032784.tar.bz2 |
Issue #1777412: extended year range of strftime down to 1000.
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r-- | Lib/test/datetimetester.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index b5822cc..4b5c890 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -1284,10 +1284,10 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase): self.assertTrue(self.theclass.max) def test_strftime_out_of_range(self): - # For nasty technical reasons, we can't handle years before 1900. + # For nasty technical reasons, we can't handle years before 1000. cls = self.theclass - self.assertEqual(cls(1900, 1, 1).strftime("%Y"), "1900") - for y in 1, 49, 51, 99, 100, 1000, 1899: + self.assertEqual(cls(1000, 1, 1).strftime("%Y"), "1000") + for y in 1, 49, 51, 99, 100, 999: self.assertRaises(ValueError, cls(y, 1, 1).strftime, "%Y") def test_replace(self): |