summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexey Pelykh <alexey.pelykh@gmail.com>2023-02-21 16:38:09 +0000
committerGitHub <noreply@github.com>2023-02-21 17:38:09 +0100
commitd02547277aff7849977c8691b5be8ae0b1ddd0ce (patch)
tree16cf3535aa6d5a18d6051c64f17b179d7f851216 /tests
parent3f8fd456e5538a5ab4cd031117dfeb9954c6410d (diff)
downloadpylint-git-d02547277aff7849977c8691b5be8ae0b1ddd0ce.tar.gz
Support globbing patterns for source-roots (#8281)
Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lint/unittest_lint.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py
index 23cde4967..5aa08572f 100644
--- a/tests/lint/unittest_lint.py
+++ b/tests/lint/unittest_lint.py
@@ -1208,6 +1208,20 @@ def test_recursive_ignore(ignore_parameter: str, ignore_parameter_value: str) ->
assert module in linted_file_paths
+def test_source_roots_globbing() -> None:
+ run = Run(
+ [
+ "--source-roots",
+ join(REGRTEST_DATA_DIR, "pep420", "basic", "*"),
+ join(REGRTEST_DATA_DIR, "pep420", "basic", "project"),
+ ],
+ exit=False,
+ )
+ assert run.linter.config.source_roots == [
+ join(REGRTEST_DATA_DIR, "pep420", "basic", "project")
+ ]
+
+
def test_recursive_implicit_namespace() -> None:
run = Run(
[