cpython: e057da873673 (original) (raw)

--- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -2,13 +2,14 @@ import calendar import unittest from test import support -from test.script_helper import assert_python_ok +from test.script_helper import assert_python_ok, assert_python_failure import time import locale import sys import datetime +import os -result_2004_01_text = """ +result_2004_01_text = """[](#l1.16) January 2004 Mo Tu We Th Fr Sa Su 1 2 3 4 @@ -18,7 +19,7 @@ 19 20 21 22 23 24 25 26 27 28 29 30 31 """ -result_2004_text = """ +result_2004_text = """[](#l1.25) 2004 January February March @@ -56,7 +57,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.34) @@ -327,8 +328,8 @@ class OutputTestCase(unittest.TestCase): def check_htmlcalendar_encoding(self, req, res): cal = calendar.HTMLCalendar() self.assertEqual(

def test_output(self): @@ -339,8 +340,8 @@ class OutputTestCase(unittest.TestCase): def test_output_textcalendar(self): self.assertEqual(

def test_output_htmlcalendar_encoding_ascii(self): @@ -383,8 +384,8 @@ class OutputTestCase(unittest.TestCase): def test_formatmonth(self): self.assertEqual(

def test_formatmonthname_with_year(self): @@ -692,23 +693,127 @@ class LeapdaysTestCase(unittest.TestCase self.assertEqual(calendar.leapdays(1997,2020), 5) -class ConsoleOutputTestCase(unittest.TestCase):

+def conv(s):

+ +class CommandLineTestCase(unittest.TestCase):

+

+

+

+

+

+

+

-def test_main():

+

+

+

+

+

+

+

+

if name == "main":

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