Skip to content

Commit 31c81e6

Browse files
vjabuildstomasr8
andauthored
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. <tomas.roun8@gmail.com>
1 parent 6ebb22c commit 31c81e6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_calendar.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,11 @@ def test_deprecation_warning(self):
554554
"The 'January' attribute is deprecated, use 'JANUARY' instead"
555555
):
556556
calendar.January
557+
with self.assertWarnsRegex(
558+
DeprecationWarning,
559+
"The 'February' attribute is deprecated, use 'FEBRUARY' instead"
560+
):
561+
calendar.February
557562

558563
def test_isleap(self):
559564
# Make sure that the return is right for a few years, and

0 commit comments

Comments
 (0)