summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Bernát <gaborjbernat@gmail.com>2018-03-21 21:37:32 +0100
committerOliver Bestwalter <oliver.bestwalter@avira.com>2018-03-22 15:05:44 +0100
commit771435dbad6391d4b9b91f58ef59022308fb5ac5 (patch)
treed4b87dcaf5c9a4d0b30ef5c973b9bbc1221b0908
parent9a9ea31922c75c275fc2e28ff842b3aad5664257 (diff)
downloadtox-git-771435dbad6391d4b9b91f58ef59022308fb5ac5.tar.gz
#773 revert breaking change of tox.cmdline not callable with no args (#775)
(cherry picked from commit 4f6d327)
-rw-r--r--.gitignore2
-rw-r--r--tests/test_z_cmdline.py4
-rw-r--r--tox/__init__.py2
3 files changed, 6 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 517aca48..e9377be4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,5 @@ htmlcov
.idea
.eggs/
py27/
+
+.*_cache
diff --git a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py
index 5eefab3b..04aee08b 100644
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -2,6 +2,7 @@ import os
import platform
import re
import subprocess
+import sys
import py
import pytest
@@ -902,8 +903,9 @@ def test_tox_quickstart_script():
def test_tox_cmdline(monkeypatch):
+ monkeypatch.setattr(sys, 'argv', ['caller_script', '--help'])
with pytest.raises(SystemExit):
- tox.cmdline(['caller_script', '--help'])
+ tox.cmdline()
@pytest.mark.parametrize('exit_code', [0, 6])
diff --git a/tox/__init__.py b/tox/__init__.py
index df61d71e..fd2b86c8 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -84,6 +84,6 @@ class exception:
super(exception.MinVersionError, self).__init__(message)
-from .session import main as cmdline # noqa
+from .session import run_main as cmdline # noqa
__all__ = ('hookspec', 'hookimpl', 'cmdline', 'exception', '__version__')