Issue #23883: Add missing APIs to calendar.__all__

Patch by Joel Taddei and Jacek Kołodziej.
This commit is contained in:
Martin Panter 2016-01-16 06:49:30 +00:00
parent 7978e10441
commit 4eb376c441
3 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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()

View File

@ -1419,6 +1419,7 @@ Péter Szabó
John Szakmeister
Amir Szekely
Maciej Szulik
Joel Taddei
Arfrever Frehtes Taifersar Arahesis
Hideaki Takahashi
Takase Arihiro