Skip to content

Commit f758fb9

Browse files
committed
Fix tox-dev#755 by reverting the cmdline import to the old location and changing the entry point instead.
1 parent 1d6ca4b commit f758fb9

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

changelog/755.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix #755 by reverting the ``cmdline`` import to the old location and changing the entry point instead - by @fschulze

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def main():
4343
author='holger krekel',
4444
author_email='[email protected]',
4545
packages=['tox'],
46-
entry_points={'console_scripts': ['tox=tox:cmdline',
46+
entry_points={'console_scripts': ['tox=tox.session:run_main',
4747
'tox-quickstart=tox._quickstart:main']},
4848
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
4949
setup_requires=['setuptools_scm'],

tests/test_z_cmdline.py

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

76
import py
87
import pytest
@@ -901,6 +900,5 @@ def test_tox_quickstart_script():
901900

902901

903902
def test_tox_cmdline(monkeypatch):
904-
monkeypatch.setattr(sys, 'argv', ['caller_script', '--help'])
905903
with pytest.raises(SystemExit):
906-
tox.cmdline()
904+
tox.cmdline(['caller_script', '--help'])

tox/__init__.py

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

5454

55-
from .session import run_main as cmdline # noqa
55+
from .session import main as cmdline # noqa
5656

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

0 commit comments

Comments
 (0)