]> granicus.if.org Git - python/commitdiff
Issue #23883: Add missing APIs to calendar.__all__
authorMartin Panter <vadmium+py@gmail.com>
Sat, 16 Jan 2016 06:49:30 +0000 (06:49 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 16 Jan 2016 06:49:30 +0000 (06:49 +0000)
Patch by Joel Taddei and Jacek Kołodziej.

Lib/calendar.py
Lib/test/test_calendar.py
Misc/ACKS

index 196a0754fc99697a252d55a5b3182956700af687..85baf2ee4a01e6de369aceda9672018ad9f1a602 100644 (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
index d9d3128ea8807dd4133f859eccfc0c0e8602d5ed..d95ad04eb0a6d99877c30ad1de749be560d33e7b 100644 (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()
index 1df5d24da08a92f5c3b6f0e68f393ba4e6f7eb5b..ebc0d5dccb00daac7b99d45db38540c4e86b04e7 100644 (file)
--- 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