]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] Test `calendar.February` deprecation (GH-153893) (#153921)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 18 Jul 2026 13:09:43 +0000 (15:09 +0200)
committerGitHub <noreply@github.com>
Sat, 18 Jul 2026 13:09:43 +0000 (15:09 +0200)
Test `calendar.February` deprecation (GH-153893)

Calendar related tests now check if both deprecated constants surface the proper warnings.

* extended `test_deprecation_warning` to check `constants.February` as well
(cherry picked from commit 31c81e6ee3b1c874a807ea161182b83c6c607713)

Co-authored-by: vjabuilds <77214151+vjabuilds@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Lib/test/test_calendar.py

index c5296f50b3df0ec9dcd02f41519930c4a6bb4ecc..9eda4edd8c535a155b9b383afc4d57da0db140ab 100644 (file)
@@ -509,6 +509,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