summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Harrison <frank@doublethefish.com>2020-03-28 09:37:12 +0000
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-06 16:23:07 +0100
commitdc1f92d9bc81db9d1b05243a89227ac7399134fa (patch)
treef5d28da24d6673efc4b819915148f72c7b15c9a1
parentd554704641efba34ce0d3c22a3f91acf06dd814f (diff)
downloadpylint-git-dc1f92d9bc81db9d1b05243a89227ac7399134fa.tar.gz
bug2674
-rw-r--r--tests/input/no_absolute_import.py5
-rw-r--r--tests/test_self.py14
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/input/no_absolute_import.py b/tests/input/no_absolute_import.py
new file mode 100644
index 000000000..69059417f
--- /dev/null
+++ b/tests/input/no_absolute_import.py
@@ -0,0 +1,5 @@
+""" Puts issue #2672 under test (-j 1 vs -j N)
+
+Here we use a simple file to ensure configs are treated exactly the same way in -j 1 and
+-j N """
+import os # pylint: disable=unused-import
diff --git a/tests/test_self.py b/tests/test_self.py
index 42ef732ec..954aa95d7 100644
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -265,6 +265,20 @@ class TestRunTC:
in out.getvalue().strip()
)
+ def test_parallel_execution_bug_2674(self):
+ """ Tests that disabling absolute imports works the same in -j1/j2 """
+ expected_ret_code = 0 # we are disabling the check, should pass
+ for jobs in (1, 2):
+ self._runtest(
+ [
+ "--py3k",
+ "--disable=no-absolute-import",
+ "-j %d" % jobs,
+ join(HERE, "input", "no_absolute_import.py"),
+ ],
+ code=expected_ret_code,
+ )
+
def test_parallel_execution_missing_arguments(self):
self._runtest(["-j 2", "not_here", "not_here_too"], code=1)