mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
Issue #23883: Add missing APIs to calendar.__all__
Patch by Joel Taddei and Jacek Kołodziej.
This commit is contained in:
parent
7978e10441
commit
4eb376c441
3 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -1419,6 +1419,7 @@ Péter Szabó
|
|||
John Szakmeister
|
||||
Amir Szekely
|
||||
Maciej Szulik
|
||||
Joel Taddei
|
||||
Arfrever Frehtes Taifersar Arahesis
|
||||
Hideaki Takahashi
|
||||
Takase Arihiro
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue