]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
The HTMLCalendar outputs bytes now, so fix the test
authorWalter Dörwald <walter@livinglogic.de>
Tue, 22 May 2007 17:03:39 +0000 (17:03 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Tue, 22 May 2007 17:03:39 +0000 (17:03 +0000)
accordingly (bytes.strip() always requires an argument).

Lib/test/test_calendar.py

index 8cbf5e0974a55fbc684f62a951d3ab0f2741cfc7..015b59ffb09a2ace96f349b702c40b2904a45650 100644 (file)
@@ -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)
         )