summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_calendar.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-25 12:20:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-25 12:20:58 (GMT)
commit0595ed21badc29b5c76602e32db9f5f1b8f0ba06 (patch)
tree1bf6841e46f47e040288373ecbba7306b52cccf9 /Lib/test/test_calendar.py
parent78d84d83263dd806fc2a9b9b6eb27ec38742e854 (diff)
downloadcpython-0595ed21badc29b5c76602e32db9f5f1b8f0ba06.zip
cpython-0595ed21badc29b5c76602e32db9f5f1b8f0ba06.tar.gz
cpython-0595ed21badc29b5c76602e32db9f5f1b8f0ba06.tar.bz2
Issue #28255: calendar.TextCalendar.prweek() no longer prints a space after
a weeks's calendar. calendar.TextCalendar.pryear() no longer prints redundant newline after a year's calendar. Based on patch by Xiang Zhang.
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 2bc4fee..bd57653 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: