summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-22 17:03:39 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-22 17:03:39 (GMT)
commitc49ebc0d07f47336b3720e546876d0f799ef0f50 (patch)
tree75939975002f4156fbd53f78b06a5187d1b5e145
parent1f5947b30a870008ebd2367b2f4f9a5897f657c9 (diff)
downloadcpython-c49ebc0d07f47336b3720e546876d0f799ef0f50.zip
cpython-c49ebc0d07f47336b3720e546876d0f799ef0f50.tar.gz
cpython-c49ebc0d07f47336b3720e546876d0f799ef0f50.tar.bz2
The HTMLCalendar outputs bytes now, so fix the test
accordingly (bytes.strip() always requires an argument).
-rw-r--r--Lib/test/test_calendar.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index 8cbf5e0..015b59f 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -194,9 +194,11 @@ class OutputTestCase(unittest.TestCase):
)
def test_output_htmlcalendar(self):
+ encoding = 'ascii'
+ cal = calendar.HTMLCalendar()
self.assertEqual(
- calendar.HTMLCalendar().formatyearpage(2004).strip(),
- result_2004_html.strip()
+ cal.formatyearpage(2004, encoding=encoding).strip(b' \t\n'),
+ result_2004_html.strip(' \t\n').encode(encoding)
)