From: vjabuilds <77214151+vjabuilds@users.noreply.github.com> Date: Sat, 18 Jul 2026 10:54:10 +0000 (+0200) Subject: Test `calendar.February` deprecation (#153893) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31c81e6ee3b1c874a807ea161182b83c6c607713;p=thirdparty%2FPython%2Fcpython.git Test `calendar.February` deprecation (#153893) Calendar related tests now check if both deprecated constants surface the proper warnings. * extended `test_deprecation_warning` to check `constants.February` as well Co-authored-by: Tomas R. --- diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index 6ed27b4095bc..8646cfcad58c 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -554,6 +554,11 @@ class CalendarTestCase(unittest.TestCase): "The 'January' attribute is deprecated, use 'JANUARY' instead" ): calendar.January + with self.assertWarnsRegex( + DeprecationWarning, + "The 'February' attribute is deprecated, use 'FEBRUARY' instead" + ): + calendar.February def test_isleap(self): # Make sure that the return is right for a few years, and