Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4eb376c

Browse files
committed
Issue #23883: Add missing APIs to calendar.__all__
Patch by Joel Taddei and Jacek Kołodziej.
1 parent 7978e10 commit 4eb376c

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lib/calendar.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
__all__ = ["IllegalMonthError", "IllegalWeekdayError", "setfirstweekday",
1313
"firstweekday", "isleap", "leapdays", "weekday", "monthrange",
1414
"monthcalendar", "prmonth", "month", "prcal", "calendar",
15-
"timegm", "month_name", "month_abbr", "day_name", "day_abbr"]
15+
"timegm", "month_name", "month_abbr", "day_name", "day_abbr",
16+
"Calendar", "TextCalendar", "HTMLCalendar", "LocaleTextCalendar",
17+
"LocaleHTMLCalendar", "weekheader"]
1618

1719
# Exception raised for bad input (with string parameter for details)
1820
error = ValueError

Lib/test/test_calendar.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,5 +815,14 @@ def test_html_output_year_css(self):
815815
b'href="custom.css" />', stdout)
816816

817817

818+
class MiscTestCase(unittest.TestCase):
819+
def test__all__(self):
820+
blacklist = {'error', 'mdays', 'January', 'February', 'EPOCH',
821+
'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY',
822+
'SATURDAY', 'SUNDAY', 'different_locale', 'c',
823+
'prweek', 'week', 'format', 'formatstring', 'main'}
824+
support.check__all__(self, calendar, blacklist=blacklist)
825+
826+
818827
if __name__ == "__main__":
819828
unittest.main()

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ Péter Szabó
14191419
John Szakmeister
14201420
Amir Szekely
14211421
Maciej Szulik
1422+
Joel Taddei
14221423
Arfrever Frehtes Taifersar Arahesis
14231424
Hideaki Takahashi
14241425
Takase Arihiro

0 commit comments

Comments
 (0)