diff options
author | Jacob Walls <jacobtylerwalls@gmail.com> | 2022-08-27 13:01:19 -0400 |
---|---|---|
committer | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-08-27 19:09:02 +0200 |
commit | 99d04fe58c9c5f66cfc7e516570512ef4122af47 (patch) | |
tree | 7ca0fc4d7e6d69995a22239cd177fe8242b1ab37 /tests/config | |
parent | 728177cfb97709b195415b29fafedf808eb7d658 (diff) | |
download | pylint-git-99d04fe58c9c5f66cfc7e516570512ef4122af47.tar.gz |
Replace deprecated `sre_constants.error` with `re.error`
Diffstat (limited to 'tests/config')
-rw-r--r-- | tests/config/unittest_config.py | 5 |
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)) |