summaryrefslogtreecommitdiff
path: root/doc/example
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2012-12-03 21:45:13 +0100
committerGabriel <g2p.code@gmail.com>2012-12-03 21:45:13 +0100
commitc540b486a6e7717df6ef08c3ec95a9db26cd97b5 (patch)
tree75669cbc10f9a4c7c31a37e9210a62c2b316bc4c /doc/example
parent3a218973bcb2d055cd0d4c28b1de6d14a1013db8 (diff)
downloadtox-c540b486a6e7717df6ef08c3ec95a9db26cd97b5.tar.gz
Relate to the 2to3 use case.
Diffstat (limited to 'doc/example')
-rwxr-xr-xdoc/example/pytest.txt22
1 files changed, 15 insertions, 7 deletions
diff --git a/doc/example/pytest.txt b/doc/example/pytest.txt
index 57f3a87..98fa077 100755
--- a/doc/example/pytest.txt
+++ b/doc/example/pytest.txt
@@ -92,15 +92,23 @@ installed package.
There are a few ways to prevent this.
-With installed tests (the tests are built and installed by setup.py),
-one option is to give the explicit path ``{envsitepackagesdir}/mypkg``
-to pytest, and another is to change directories and pass ``--pyargs
-mypkg``. With tests that won't be installed, the simplest way is to
-avoid ``__init__.py`` files in test directories; pytest will still find
-them but they won't be copied to other places and they won't be found by
-Python's import system.
+With installed tests (the tests packages are known to ``setup.py``), a
+safe and explicit option is to give the explicit path
+``{envsitepackagesdir}/mypkg`` to pytest.
+Alternatively, it is possible to use ``changedir`` so that checked-out
+files are outside the import path, then pass ``--pyargs mypkg`` to
+pytest.
+
+Installed tests are particularly convenient when combined with
+`Distribute's 2to3 support` (``use_2to3``).
+
+With tests that won't be installed, the simplest way is to avoid
+``__init__.py`` files in test directories; pytest will still find them
+but they won't be copied to other places or be found by Python's import
+system.
.. _`fully qualified name`: http://pytest.org/latest/goodpractises.html#package-name
+.. _`Distribute's 2to3 support`: http://packages.python.org/distribute/python3.html
.. include:: ../links.txt