diff options
| author | Monty Taylor <mordred@inaugust.com> | 2013-07-16 10:56:23 -0400 |
|---|---|---|
| committer | Monty Taylor <mordred@inaugust.com> | 2013-07-16 10:56:23 -0400 |
| commit | a00871f888376a4e147a324c6e0983410b3674db (patch) | |
| tree | df3cfaecd16686356cb1e30dc1ca65cedd285325 | |
| parent | 3a3e11c0b4e76f0c96184bd1b02889b6d7da2198 (diff) | |
| download | tox-a00871f888376a4e147a324c6e0983410b3674db.tar.gz | |
Add command line option for develop
| -rw-r--r-- | tests/test_z_cmdline.py | 12 | ||||
| -rw-r--r-- | tox/_cmdline.py | 2 | ||||
| -rw-r--r-- | tox/_config.py | 7 |
3 files changed, 16 insertions, 5 deletions
diff --git a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py index b45cab4..139f232 100644 --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -359,7 +359,14 @@ def test_test_simple(cmd, initproj): ]) -def test_test_develop(cmd, initproj): +def test_develop(initproj, cmd): + initproj("example123", filedefs={'tox.ini': """ + """}) + result = cmd.run("tox", "-v", "--develop") + assert not result.ret + assert "sdist-make" not in result.stdout.str() + +def test_test_usedevelop(cmd, initproj): initproj("example123-0.5", filedefs={ 'tests': {'test_hello.py': """ def test_hello(pytestconfig): @@ -376,12 +383,13 @@ def test_test_develop(cmd, initproj): deps=pytest ''' }) - result = cmd.run("tox") + result = cmd.run("tox", "-v") assert not result.ret result.stdout.fnmatch_lines([ "*junit-python.xml*", "*1 passed*", ]) + assert "sdist-make" not in result.stdout.str() result = cmd.run("tox", "-epython", ) assert not result.ret result.stdout.fnmatch_lines([ diff --git a/tox/_cmdline.py b/tox/_cmdline.py index d3fce4d..3553a20 100644 --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -391,7 +391,7 @@ class Session: return for venv in self.venvlist: if self.setupenv(venv): - if self.config.usedevelop: + if self.config.usedevelop or self.config.option.develop: self.developpkg(venv, self.config.setupdir) elif self.config.skipsdist: self.finishvenv(venv) diff --git a/tox/_config.py b/tox/_config.py index d6e39e4..2d34b50 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -90,6 +90,8 @@ def prepare_parse(pkgname): help="skip invoking test commands.") parser.add_argument("--sdistonly", action="store_true", dest="sdistonly", help="only perform the sdist packaging activity.") + parser.add_argument("--develop", action="store_true", dest="develop", + help="install package in the venv using setup.py develop") parser.add_argument("--installpkg", action="store", default=None, help="use specified package for installation into venv") parser.add_argument('-i', action="append", @@ -195,8 +197,9 @@ class parseini: config.toxworkdir = reader.getpath(toxsection, "toxworkdir", "{toxinidir}/.tox") config.usedevelop = reader.getbool(toxsection, "usedevelop", False) - config.skipsdist = reader.getbool( - toxsection, "skipsdist", config.usedevelop) + config.skipsdist = reader.getbool(toxsection, "skipsdist", + config.usedevelop + or config.option.develop) config.minversion = reader.getdefault(toxsection, "minversion", None) # determine indexserver dictionary |
