Skip to content

Commit bc80289

Browse files
committed
Calendar related tests now check if both deprecated constants surface the proper warnings.
* extended `test_deprecation_warning` to check `constants.February` as well
1 parent 0983642 commit bc80289

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)