mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
This commit is contained in:
parent
40caa05fa4
commit
e1a34ceb54
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue