summaryrefslogtreecommitdiff
path: root/Lib/test/test_calendar.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-09-21 17:29:20 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2012-09-21 17:29:20 +0300
commite537f60262a0a82452f95e556979aa09206d09ca (patch)
treeecfa1d38b06317e18a1efe91654fe7bf014f91ec /Lib/test/test_calendar.py
parentc3bcd31be0d6015115130717b865be276e4a622a (diff)
parentabcfa34000bab186a282faf62d49e378d783b1ee (diff)
downloadcpython-e537f60262a0a82452f95e556979aa09206d09ca.tar.gz
#15421: merge with 3.2.
Diffstat (limited to 'Lib/test/test_calendar.py')
-rw-r--r--Lib/test/test_calendar.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index e0f63997d5..e594e01be0 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -6,6 +6,7 @@ from test.script_helper import assert_python_ok
import time
import locale
import sys
+import datetime
result_2004_01_text = """
January 2004
@@ -464,6 +465,11 @@ class CalendarTestCase(unittest.TestCase):
new_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
self.assertEqual(old_october, new_october)
+ def test_itermonthdates(self):
+ # ensure itermonthdates doesn't overflow after datetime.MAXYEAR
+ # see #15421
+ list(calendar.Calendar().itermonthdates(datetime.MAXYEAR, 12))
+
class MonthCalendarTestCase(unittest.TestCase):
def setUp(self):