Skip to content

Commit 4f6d327

Browse files
gaborbernatobestwalter
authored andcommitted
#773 revert breaking change of tox.cmdline not callable with no args (#775)
1 parent 765c977 commit 4f6d327

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ htmlcov
2323
.idea
2424
.eggs/
2525
py27/
26+
27+
.*_cache

tests/test_z_cmdline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import platform
33
import re
44
import subprocess
5+
import sys
56

67
import py
78
import pytest
@@ -902,8 +903,9 @@ def test_tox_quickstart_script():
902903

903904

904905
def test_tox_cmdline(monkeypatch):
906+
monkeypatch.setattr(sys, 'argv', ['caller_script', '--help'])
905907
with pytest.raises(SystemExit):
906-
tox.cmdline(['caller_script', '--help'])
908+
tox.cmdline()
907909

908910

909911
@pytest.mark.parametrize('exit_code', [0, 6])

tox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ def __init__(self, message):
8484
super(exception.MinVersionError, self).__init__(message)
8585

8686

87-
from .session import main as cmdline # noqa
87+
from .session import run_main as cmdline # noqa
8888

8989
__all__ = ('hookspec', 'hookimpl', 'cmdline', 'exception', '__version__')

0 commit comments

Comments
 (0)