summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)