Skip to content

Commit e09f49e

Browse files
miss-islingtonvjabuildstomasr8
authored
[3.15] Test calendar.February deprecation (GH-153893) (#153919)
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 31c81e6) Co-authored-by: vjabuilds <77214151+vjabuilds@users.noreply.github.com> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
1 parent 72b9163 commit e09f49e

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)