8000 closes bpo-34654: Tolerate + at the beginning of large years. by benjaminp · Pull Request #9238 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

closes bpo-34654: Tolerate + at the beginning of large years. #9238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
closes bpo-34654: Tolerate + at the beginning of large years.
  • Loading branch information
benjaminp committed Sep 12, 2018
commit f55f5f8277410d0b1f9be761c9f1f6f03a94659f
6 changes: 3 additions & 3 deletions Lib/test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
0