[Python-checkins] cpython: Issue #23883: Add missing APIs to calendar.__all__
martin.panter
python-checkins at python.org
Sat Jan 16 02:39:22 EST 2016
https://hg.python.org/cpython/rev/a2ffa9eedb1b
changeset: 99926:a2ffa9eedb1b
user: Martin Panter <vadmium+py at gmail.com>
date: Sat Jan 16 06:49:30 2016 +0000
summary:
Issue #23883: Add missing APIs to calendar.__all__
Patch by Joel Taddei and Jacek Kołodziej.
files:
Lib/calendar.py | 4 +++-
Lib/test/test_calendar.py | 9 +++++++++
Misc/ACKS | 1 +
3 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Lib/calendar.py b/Lib/calendar.py
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -12,7 +12,9 @@
__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
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -815,5 +815,14 @@
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
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1419,6 +1419,7 @@
John Szakmeister
Amir Szekely
Maciej Szulik
+Joel Taddei
Arfrever Frehtes Taifersar Arahesis
Hideaki Takahashi
Takase Arihiro
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list