cpython: 50a5c262b2e6 (original) (raw)

--- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -2,11 +2,22 @@ import calendar import unittest from test import test_support +from test.script_helper import assert_python_ok, assert_python_failure import locale import datetime - +import os -result_2004_text = """ +result_2004_01_text = """[](#l1.14)

+Mo Tu We Th Fr Sa Su

January February March @@ -44,7 +55,7 @@ 18 19 20 21 22 23 24 22 23 24 25 26 25 26 27 28 29 30 31 29 30 27 28 29 30 31 """ -result_2004_html = """ +result_2004_html = """[](#l1.33) @@ -460,6 +471,124 @@ class LeapdaysTestCase(unittest.TestCase self.assertEqual(calendar.leapdays(1997,2020), 5) +class CommandLineTestCase(unittest.TestCase):

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+ + def test_main(): test_support.run_unittest( OutputTestCase, @@ -468,8 +597,10 @@ def test_main(): SundayTestCase, MonthRangeTestCase, LeapdaysTestCase,

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -98,6 +98,8 @@ Tools/Demos Tests ----- +- Issue #18982: Add tests for CLI of the calendar module. +