summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_calendar.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-08-11 01:22:52 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-08-11 01:22:52 (GMT)
commit962fed91018ab95f0fb5ec564b4543729e6aa5fc (patch)
tree5bf13de1ff70e6309791e75627f9725add0ed235 /Lib/test/test_calendar.py
parent77c4fd01dd3fa9b7830ca3dcd1506565352d32f3 (diff)
downloadcpython-962fed91018ab95f0fb5ec564b4543729e6aa5fc.zip
cpython-962fed91018ab95f0fb5ec564b4543729e6aa5fc.tar.gz
cpython-962fed91018ab95f0fb5ec564b4543729e6aa5fc.tar.bz2
Fix closes Issue10087 - fixing the output of calendar display in the html format. Patch by Chris Lambacher. Test Contributed by catherine.
Diffstat (limited to 'Lib/test/test_calendar.py')
-rw-r--r--Lib/test/test_calendar.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index 4bd758b..d3093ac 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -2,6 +2,7 @@ import calendar
import unittest
from test import support
+from test.script_helper import assert_python_ok
import time
import locale
@@ -451,6 +452,11 @@ class LeapdaysTestCase(unittest.TestCase):
self.assertEqual(calendar.leapdays(1997,2020), 5)
+class ConsoleOutputTestCase(unittest.TestCase):
+ def test_outputs_bytes(self):
+ (return_code, stdout, stderr) = assert_python_ok('-m', 'calendar', '--type=html', '2010')
+ self.assertEqual(stdout[:6], b'<?xml ')
+
def test_main():
support.run_unittest(
OutputTestCase,
@@ -460,6 +466,7 @@ def test_main():
TimegmTestCase,
MonthRangeTestCase,
LeapdaysTestCase,
+ ConsoleOutputTestCase
)