summaryrefslogtreecommitdiff
path: root/Lib/test/test_calendar.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
commit3b0e4320092ac0504b6670cafaf0301b908c91fc (patch)
treed3be1b6b844d61763bb366fa21ceed475e5703fd /Lib/test/test_calendar.py
parentb2fa705fd3887c326e811c418469c784353027f4 (diff)
parentf687fbcd73c14dfcbe086eb5cd94b298f1e81e72 (diff)
downloadcpython-3b0e4320092ac0504b6670cafaf0301b908c91fc.tar.gz
Issue #29392: Prevent crash when passing invalid arguments into msvcrt module.
Diffstat (limited to 'Lib/test/test_calendar.py')
-rw-r--r--Lib/test/test_calendar.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index 2bc4feebbd..bd57653ffa 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -404,7 +404,7 @@ class OutputTestCase(unittest.TestCase):
with support.captured_stdout() as out:
week = [(1,0), (2,1), (3,2), (4,3), (5,4), (6,5), (7,6)]
calendar.TextCalendar().prweek(week, 1)
- self.assertEqual(out.getvalue().strip(), "1 2 3 4 5 6 7")
+ self.assertEqual(out.getvalue(), " 1 2 3 4 5 6 7")
def test_prmonth(self):
with support.captured_stdout() as out:
@@ -414,7 +414,7 @@ class OutputTestCase(unittest.TestCase):
def test_pryear(self):
with support.captured_stdout() as out:
calendar.TextCalendar().pryear(2004)
- self.assertEqual(out.getvalue().strip(), result_2004_text.strip())
+ self.assertEqual(out.getvalue(), result_2004_text)
def test_format(self):
with support.captured_stdout() as out: