From 4eb376c441f99e9ea50beae5309020a1469393ac Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Sat, 16 Jan 2016 06:49:30 +0000 Subject: [PATCH] Issue #23883: Add missing APIs to calendar.__all__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Joel Taddei and Jacek Kołodziej. --- Lib/calendar.py | 4 +++- Lib/test/test_calendar.py | 9 +++++++++ Misc/ACKS | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Lib/calendar.py b/Lib/calendar.py index 196a0754fc9..85baf2ee4a0 100644 --- a/Lib/calendar.py +++ b/Lib/calendar.py @@ -12,7 +12,9 @@ import locale as _locale __all__ = ["IllegalMonthError", "IllegalWeekdayError", "setfirstweekday", "firstweekday", "isleap", "leapdays", "weekday", "monthrange", "monthcalendar", "prmonth", "month", "prcal", "calendar", - "timegm", "month_name", "month_abbr", "day_name", "day_abbr"] + "timegm", "month_name", "month_abbr", "day_name", "day_abbr", + "Calendar", "TextCalendar", "HTMLCalendar", "LocaleTextCalendar", + "LocaleHTMLCalendar", "weekheader"] # Exception raised for bad input (with string parameter for details) error = ValueError diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index d9d3128ea88..d95ad04eb0a 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -815,5 +815,14 @@ class CommandLineTestCase(unittest.TestCase): b'href="custom.css" />', stdout) +class MiscTestCase(unittest.TestCase): + def test__all__(self): + blacklist = {'error', 'mdays', 'January', 'February', 'EPOCH', + 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', + 'SATURDAY', 'SUNDAY', 'different_locale', 'c', + 'prweek', 'week', 'format', 'formatstring', 'main'} + support.check__all__(self, calendar, blacklist=blacklist) + + if __name__ == "__main__": unittest.main() diff --git a/Misc/ACKS b/Misc/ACKS index 1df5d24da08..ebc0d5dccb0 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1419,6 +1419,7 @@ Péter Szabó John Szakmeister Amir Szekely Maciej Szulik +Joel Taddei Arfrever Frehtes Taifersar Arahesis Hideaki Takahashi Takase Arihiro