Skip to content

Commit

Permalink
Parallel arg bug, remove broken arg cleanup code (#1198)
Browse files Browse the repository at this point in the history
This resolves issue #1192 where the argument to --parallel was sometimes being passed as a `posarg`

Fixes: #1192
  • Loading branch information
timdaman authored and gaborbernat committed Mar 18, 2019
1 parent 13eaa21 commit d17fd1e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Expand Up @@ -68,6 +68,7 @@ Selim Belhaouane
Stephen Finucane
Sridhar Ratnakumar
Sviatoslav Sydorenko
Tim Laurence
Ville Skyttä
Xander Johnson
anatoly techtonik
1 change: 1 addition & 0 deletions docs/changelog/1192.bugfix.rst
@@ -0,0 +1 @@
Removed code that sometimes caused a difference in results between ``--parallel`` and ``-p`` when using ``posargs`` - by :user:`timdaman`
6 changes: 0 additions & 6 deletions src/tox/session/commands/run/parallel.py
Expand Up @@ -17,12 +17,6 @@ def run_parallel(config, venv_dict):
position = args.index("--")
except ValueError:
position = len(args)
try:
parallel_at = args[0:position].index("--parallel")
del args[parallel_at]
position -= 1
except ValueError:
pass

max_parallel = config.option.parallel
if max_parallel is None:
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/package/test_package_parallel.py
Expand Up @@ -7,7 +7,9 @@
from tox.session.commands.run import sequential


@pytest.mark.skipif(platform.python_implementation() == "pypy", reason="this is flaky on pypy")
@pytest.mark.skipif(
platform.python_implementation().lower() == "pypy", reason="this is flaky on pypy"
)
def test_tox_parallel_build_safe(initproj, cmd, mock_venv, monkeypatch):
initproj(
"env_var_test",
Expand Down

0 comments on commit d17fd1e

Please sign in to comment.