diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2020-05-02 12:21:20 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-05-02 12:43:02 +0200 |
commit | 385ce4241921d3f1623771697f67fb589049f5eb (patch) | |
tree | def4bd7acc555d7f53236203866efdb55c9819e8 /tests | |
parent | 1664303adf06ace39225c079e559a26861f954f6 (diff) | |
download | pylint-git-385ce4241921d3f1623771697f67fb589049f5eb.tar.gz |
Allow package files to be properly discovered with multiple jobs
Close #3524
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_self.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test_self.py b/tests/test_self.py index f892224bb..296d93e74 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -732,3 +732,34 @@ class TestRunTC: ], cwd=str(tmpdir), ) + + def test_allow_import_of_files_found_in_modules_during_parallel_check(self, tmpdir): + test_directory = tmpdir / "test_directory" + test_directory.mkdir() + spam_module = test_directory / "spam.py" + spam_module.write("'Empty'") + + init_module = test_directory / "__init__.py" + init_module.write("'Empty'") + + # For multiple jobs we could not find the `spam.py` file. + with tmpdir.as_cwd(): + self._runtest( + [ + "-j2", + "--disable=missing-docstring, missing-final-newline", + "test_directory", + ], + code=0, + ) + + # A single job should be fine as well + with tmpdir.as_cwd(): + self._runtest( + [ + "-j1", + "--disable=missing-docstring, missing-final-newline", + "test_directory", + ], + code=0, + ) |