diff options
author | holger krekel <holger@merlinux.eu> | 2010-07-12 11:51:14 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2010-07-12 11:51:14 +0200 |
commit | deb494bcd43ef5f7ff4967fc9a0ccf66b7ae1651 (patch) | |
tree | e88522f24eafd1e45925db58f6fb5b098ba8f3cc /doc/example/pytest.txt | |
parent | 104211d072e9382d7a48632cd4894aafe3f6ba2e (diff) | |
download | tox-deb494bcd43ef5f7ff4967fc9a0ccf66b7ae1651.tar.gz |
introduce py24,py25,py26,py27,py31,py32,pypy,jython default environments
streamline examples
Diffstat (limited to 'doc/example/pytest.txt')
-rw-r--r-- | doc/example/pytest.txt | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/doc/example/pytest.txt b/doc/example/pytest.txt index 5fb2c95..3d77404 100644 --- a/doc/example/pytest.txt +++ b/doc/example/pytest.txt @@ -16,20 +16,19 @@ Assuming the following layout:: and the following ``tox.ini`` content:: + [tox] + envlist = py26,py31 + [testenv] deps=py # PYPI package providing py.test commands= py.test \ [] # substitute with tox' positional arguments - [testenv:py26] - basepython=python2.6 - [testenv:py31] - basepython=python3.1 -you can invoke ``tox`` in the directory where your ``tox.ini`` resides. -``tox`` will sdist-package your project create two virtualenv environments +you can now invoke ``tox`` in the directory where your ``tox.ini`` resides. +``tox`` will sdist-package your project, create two virtualenv environments with the ``python2.6`` and ``python3.1`` interpreters, respectively, and will -then run the specified test command. +then run the specified test command in each of them. Extended example: change dir before test and use per-virtualenv tempdir -------------------------------------------------------------------------- @@ -42,17 +41,15 @@ Assuming the following layout:: and the following ``tox.ini`` content:: + [tox] + envlist = py26,py31 [testenv] changedir=tests deps=py commands= py.test \ - --basetemp={envtmpdir} \ # py.test uses the per-virtualenv temp dir - [] # substitute with tox' positional arguments - [testenv:py26] - basepython=python2.6 - [testenv:py31] - basepython=python3.1 + --basetemp={envtmpdir} \ # py.test tempdir setting + [] # substitute with tox' positional arguments you can invoke ``tox`` in the directory where your ``tox.ini`` resides. Differently than in the previous example the ``py.test`` command |