summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2022-08-27 13:01:19 -0400
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-11-17 14:03:15 +0100
commite5c81a9c73fcc0e97168937a3b0c6292b2c8b45f (patch)
treed10587e1b9a503276c9d61a528888824eba70ea0
parentff159a6a5b6b1d0df5bd85af49386f440a5ded45 (diff)
downloadpylint-git-e5c81a9c73fcc0e97168937a3b0c6292b2c8b45f.tar.gz
Replace deprecated `sre_constants.error` with `re.error`
-rw-r--r--tests/config/unittest_config.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/config/unittest_config.py b/tests/config/unittest_config.py
index 8c668aa52..a75de41bb 100644
--- a/tests/config/unittest_config.py
+++ b/tests/config/unittest_config.py
@@ -7,7 +7,6 @@
from __future__ import annotations
import re
-import sre_constants
import pytest
@@ -24,7 +23,7 @@ def test__regexp_validator_valid() -> None:
def test__regexp_validator_invalid() -> None:
- with pytest.raises(sre_constants.error):
+ with pytest.raises(re.error):
config.option._regexp_validator(None, None, "test_)")
@@ -56,7 +55,7 @@ def test__regexp_csv_validator_valid() -> None:
def test__regexp_csv_validator_invalid() -> None:
pattern_strings = ["test_.*", "foo\\.bar", "^baz)$"]
- with pytest.raises(sre_constants.error):
+ with pytest.raises(re.error):
config.option._regexp_csv_validator(None, None, ",".join(pattern_strings))