summaryrefslogtreecommitdiff
path: root/doc/en/usage.rst
diff options
context:
space:
mode:
authorBrian Maissy <brian.maissy@gmail.com>2018-01-25 23:07:34 +0200
committerBrian Maissy <brian.maissy@gmail.com>2018-01-25 23:07:34 +0200
commit4285325cb88d90ad36724de9d441e51da614f249 (patch)
tree1370556d1276709f2245a5ae9f4b30617eaaa267 /doc/en/usage.rst
parentff90c9e23765159469a0d21fee6e5fedc13f06d6 (diff)
downloadpytest-4285325cb88d90ad36724de9d441e51da614f249.tar.gz
Added note that calling pytest.main multiple times from the same process is not recommended because of import caching
Diffstat (limited to 'doc/en/usage.rst')
-rw-r--r--doc/en/usage.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/en/usage.rst b/doc/en/usage.rst
index 6091db8be..18830792b 100644
--- a/doc/en/usage.rst
+++ b/doc/en/usage.rst
@@ -387,6 +387,15 @@ hook was invoked::
$ python myinvoke.py
*** test run reporting finishing
-
+
+.. note::
+
+ Calling ``pytest.main()`` will result in importing your tests and any modules
+ that they import. Due to the caching mechanism of python's import system,
+ making subsequent calls to ``pytest.main()`` from the same process will not
+ reflect changes to those files between the calls. For this reason, making
+ multiple calls to ``pytest.main()`` from the same process (in order to re-run
+ tests, for example) is not recommended.
+
.. include:: links.inc