diff options
| author | holger krekel <holger@merlinux.eu> | 2014-05-19 20:38:10 +0200 |
|---|---|---|
| committer | holger krekel <holger@merlinux.eu> | 2014-05-19 20:38:10 +0200 |
| commit | d9fe91532ccd6e7e78526b608fb350e76b00f865 (patch) | |
| tree | 1614f49af7b05b295d128e2d7a2929f42c36b654 | |
| parent | da140fed8e96394ad49224a45d76a525b62f00b2 (diff) | |
| parent | 2fb40807b914cc6e1bc4e5ef877133ab08c1c43a (diff) | |
| download | tox-d9fe91532ccd6e7e78526b608fb350e76b00f865.tar.gz | |
Merged in tbekolay/tox/tbekolay/better-setuptools-integration-in-basic-1400524487298 (pull request #109)
Better setuptools integration in basic
| -rw-r--r-- | doc/example/basic.txt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/example/basic.txt b/doc/example/basic.txt index 19a15d4..9c2d984 100644 --- a/doc/example/basic.txt +++ b/doc/example/basic.txt @@ -1,4 +1,3 @@ - Basic usage ============================================= @@ -207,6 +206,10 @@ a test run when ``python setup.py test`` is issued:: import sys class Tox(TestCommand): + user_options = [('tox-args=', 'a', "Arguments to pass to tox")] + def initialize_options(self): + TestCommand.initialize_options(self) + self.tox_args = None def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] @@ -214,7 +217,8 @@ a test run when ``python setup.py test`` is issued:: def run_tests(self): #import here, cause outside the eggs aren't loaded import tox - errno = tox.cmdline(self.test_args) + import shlex + errno = tox.cmdline(args=shlex.split(self.tox_args)) sys.exit(errno) setup( @@ -227,5 +231,9 @@ Now if you run:: python setup.py test -this will install tox and then run tox. +this will install tox and then run tox. You can pass arguments to ``tox`` +using the ``--tox-args`` or ``-a`` command-line options. For example:: + + python setup.py test -a "-epy27" +is equivalent to running ``tox -epy27``.
\ No newline at end of file |
