diff --git a/tests/times_test.py b/tests/times_test.py index 9a82668f..f10e79f0 100644 --- a/tests/times_test.py +++ b/tests/times_test.py @@ -106,7 +106,7 @@ def test_parse_year(self) -> None: def test_parse_year_0(self) -> None: with pytest.raises( ValueError, - match="^year 0 is out of range$|^year must be in 1..9999$", + match="^year 0 is out of range$|year must be in 1..9999", ): KmlDateTime.parse("0000") @@ -123,11 +123,11 @@ def test_parse_year_month_no_dash(self) -> None: assert dt.dt == datetime.datetime(2000, 4, 1, tzinfo=tzutc()) def test_parse_year_month_0(self) -> None: - with pytest.raises(ValueError, match="^month must be in 1..12$"): + with pytest.raises(ValueError, match="month must be in 1..12"): KmlDateTime.parse("2000-00") def test_parse_year_month_13(self) -> None: - with pytest.raises(ValueError, match="^month must be in 1..12$"): + with pytest.raises(ValueError, match="month must be in 1..12"): KmlDateTime.parse("2000-13") def test_parse_year_month_day(self) -> None: @@ -145,7 +145,7 @@ def test_parse_year_month_day_no_dash(self) -> None: def test_parse_year_month_day_0(self) -> None: with pytest.raises( ValueError, - match="^day is out of range for month$|^day must be in 1..31'$", + match="^day is out of range for month$|day must be in 1..31", ): KmlDateTime.parse("2000-05-00")