Skip to content

Commit

Permalink
bug2674
Browse files Browse the repository at this point in the history
  • Loading branch information
doublethefish committed Mar 30, 2020
1 parent 0dc089f commit c7288b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/input/no_absolute_import.py
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions tests/test_self.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,20 @@ def test_parallel_execution(self):
code=2,
)

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)

Expand Down

0 comments on commit c7288b7

Please sign in to comment.