Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for disables being ignored with multiple jobs #4173

Merged
merged 1 commit into from
Mar 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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