diff --git a/ci/test_custom_linters.py b/ci/test_custom_linters.py index 4911e8fd9..77ff03cb1 100644 --- a/ci/test_custom_linters.py +++ b/ci/test_custom_linters.py @@ -103,10 +103,7 @@ def test_tests_collected_once(request: pytest.FixtureRequest) -> None: for pattern in ci_patterns: tests = _tests_from_pattern(ci_pattern=pattern) for test in tests: - if test in tests_to_patterns: - tests_to_patterns[test].add(pattern) - else: - tests_to_patterns[test] = {pattern} + tests_to_patterns.setdefault(test, set()).add(pattern) for test_name, patterns in tests_to_patterns.items(): message = ( diff --git a/pyproject.toml b/pyproject.toml index 4ef7618a7..63b0eeac3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -374,7 +374,7 @@ run.omit = [ "src/mock_vws/_flask_server/healthcheck.py", ] run.parallel = true -run.source = [ "src/", "tests/" ] +run.source = [ "ci/", "src/", "tests/" ] report.exclude_also = [ "class .*\\bProtocol\\):", "if TYPE_CHECKING:",