diff options
author | Benjamin Peterson <benjamin@python.org> | 2018-09-12 23:21:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 23:21:36 (GMT) |
commit | e1a34ceb541ef87e03bb428630097dacc9c658e5 (patch) | |
tree | 7eb543a0de0a43b0f31674ed6db51267b4fab173 | |
parent | 40caa05fa4d1810a1a6bfc34e0ec930c351089b7 (diff) | |
download | cpython-e1a34ceb541ef87e03bb428630097dacc9c658e5.zip cpython-e1a34ceb541ef87e03bb428630097dacc9c658e5.tar.gz cpython-e1a34ceb541ef87e03bb428630097dacc9c658e5.tar.bz2 |
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
-rw-r--r-- | Lib/test/test_time.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 9acd1d4..62abd89 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -703,9 +703,9 @@ class _Test4dYear: self.assertEqual(func(9999), fmt % 9999) def test_large_year(self): - self.assertEqual(self.yearstr(12345), '12345') - self.assertEqual(self.yearstr(123456789), '123456789') - self.assertEqual(self.yearstr(TIME_MAXYEAR), str(TIME_MAXYEAR)) + self.assertEqual(self.yearstr(12345).lstrip('+'), '12345') + self.assertEqual(self.yearstr(123456789).lstrip('+'), '123456789') + self.assertEqual(self.yearstr(TIME_MAXYEAR).lstrip('+'), str(TIME_MAXYEAR)) self.assertRaises(OverflowError, self.yearstr, TIME_MAXYEAR + 1) def test_negative(self): |