Skip to content

Commit e5c81a9

Browse files
jacobtylerwallsPierre-Sassoulas
authored andcommitted
Replace deprecated sre_constants.error with re.error
1 parent ff159a6 commit e5c81a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/config/unittest_config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from __future__ import annotations
88

99
import re
10-
import sre_constants
1110

1211
import pytest
1312

@@ -24,7 +23,7 @@ def test__regexp_validator_valid() -> None:
2423

2524

2625
def test__regexp_validator_invalid() -> None:
27-
with pytest.raises(sre_constants.error):
26+
with pytest.raises(re.error):
2827
config.option._regexp_validator(None, None, "test_)")
2928

3029

@@ -56,7 +55,7 @@ def test__regexp_csv_validator_valid() -> None:
5655

5756
def test__regexp_csv_validator_invalid() -> None:
5857
pattern_strings = ["test_.*", "foo\\.bar", "^baz)$"]
59-
with pytest.raises(sre_constants.error):
58+
with pytest.raises(re.error):
6059
config.option._regexp_csv_validator(None, None, ",".join(pattern_strings))
6160

6261

0 commit comments

Comments
 (0)