summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-13 00:06:53 (GMT)
committerGitHub <noreply@github.com>2018-09-13 00:06:53 (GMT)
commit21a808230aa33741f1dd9bf38f0e283c1b72210e (patch)
treed7e35f2ea7f134a4300ec96ef6163b1abad65b6a
parentbdace2ea53c578184235729a4cf383891084cc70 (diff)
downloadcpython-21a808230aa33741f1dd9bf38f0e283c1b72210e.zip
cpython-21a808230aa33741f1dd9bf38f0e283c1b72210e.tar.gz
cpython-21a808230aa33741f1dd9bf38f0e283c1b72210e.tar.bz2
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
(cherry picked from commit e1a34ceb541ef87e03bb428630097dacc9c658e5) Co-authored-by: Benjamin Peterson <benjamin@python.org>
-rw-r--r--Lib/test/test_time.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index b22546d..6e57b60 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -603,9 +603,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):