diff options
author | Brian Curtin <brian@python.org> | 2011-08-11 01:34:20 (GMT) |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-08-11 01:34:20 (GMT) |
commit | c29966f3927caa6878e70596443a50a53e7ebf60 (patch) | |
tree | 6bc98c385bfa130dae4cfc76c7677e9643e8ddb2 /Lib/test/test_calendar.py | |
parent | 0275fc191caf88da56d913b1b3fe8e8a77f59210 (diff) | |
parent | 5b0a4d22c50ca73f715d3cdf2969e941a63a3468 (diff) | |
download | cpython-c29966f3927caa6878e70596443a50a53e7ebf60.zip cpython-c29966f3927caa6878e70596443a50a53e7ebf60.tar.gz cpython-c29966f3927caa6878e70596443a50a53e7ebf60.tar.bz2 |
merge
Diffstat (limited to 'Lib/test/test_calendar.py')
-rw-r--r-- | Lib/test/test_calendar.py | 7 |
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 ) |