mirror of
https://github.com/python/cpython.git
synced 2026-04-22 03:41:08 +00:00
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
(cherry picked from commit e1a34ceb54)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
This commit is contained in:
parent
98344a4f2f
commit
ea2fcd3db6
1 changed files with 3 additions and 3 deletions
|
|
@ -703,9 +703,9 @@ def test_year(self, fmt=None, func=None):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue