From e1a34ceb541ef87e03bb428630097dacc9c658e5 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 12 Sep 2018 16:21:36 -0700 Subject: [PATCH] closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238) --- Lib/test/test_time.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 9acd1d497e..62abd891aa 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): -- 2.40.0