diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-09-04 13:05:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 13:05:29 +0200 |
commit | 89737663f6a8891f5f5ae3e9a7d689cfec569ee8 (patch) | |
tree | 71a1c64f9097525c4753da98475f0f64fc242d6b /tests/config | |
parent | c2989ad5c71b3e1be0f0a7e5297f9b7e47fa2766 (diff) | |
download | pylint-git-89737663f6a8891f5f5ae3e9a7d689cfec569ee8.tar.gz |
Add typing to ``unittest_config`` (#7404)
Diffstat (limited to 'tests/config')
-rw-r--r-- | tests/config/unittest_config.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/config/unittest_config.py b/tests/config/unittest_config.py index a75de41bb..343663602 100644 --- a/tests/config/unittest_config.py +++ b/tests/config/unittest_config.py @@ -17,19 +17,19 @@ from pylint.typing import MessageDefinitionTuple def test__regexp_validator_valid() -> None: - result = config.option._regexp_validator(None, None, "test_.*") + result = config.option._regexp_validator(None, "", "test_.*") assert isinstance(result, re.Pattern) assert result.pattern == "test_.*" def test__regexp_validator_invalid() -> None: with pytest.raises(re.error): - config.option._regexp_validator(None, None, "test_)") + config.option._regexp_validator(None, "", "test_)") def test__csv_validator_no_spaces() -> None: values = ["One", "Two", "Three"] - result = config.option._csv_validator(None, None, ",".join(values)) + result = config.option._csv_validator(None, "", ",".join(values)) assert isinstance(result, list) assert len(result) == 3 for i, value in enumerate(values): @@ -38,7 +38,7 @@ def test__csv_validator_no_spaces() -> None: def test__csv_validator_spaces() -> None: values = ["One", "Two", "Three"] - result = config.option._csv_validator(None, None, ", ".join(values)) + result = config.option._csv_validator(None, "", ", ".join(values)) assert isinstance(result, list) assert len(result) == 3 for i, value in enumerate(values): @@ -47,7 +47,7 @@ def test__csv_validator_spaces() -> None: def test__regexp_csv_validator_valid() -> None: pattern_strings = ["test_.*", "foo\\.bar", "^baz$"] - result = config.option._regexp_csv_validator(None, None, ",".join(pattern_strings)) + result = config.option._regexp_csv_validator(None, "", ",".join(pattern_strings)) for i, regex in enumerate(result): assert isinstance(regex, re.Pattern) assert regex.pattern == pattern_strings[i] @@ -56,7 +56,7 @@ def test__regexp_csv_validator_valid() -> None: def test__regexp_csv_validator_invalid() -> None: pattern_strings = ["test_.*", "foo\\.bar", "^baz)$"] with pytest.raises(re.error): - config.option._regexp_csv_validator(None, None, ",".join(pattern_strings)) + config.option._regexp_csv_validator(None, "", ",".join(pattern_strings)) class TestPyLinterOptionSetters(CheckerTestCase): |