summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2016-06-29 18:08:06 -0300
committerGitHub <noreply@github.com>2016-06-29 18:08:06 -0300
commit75ecd942944645c58baa12597b7204d6ca155159 (patch)
treea21b62fe08828d92ce6eff1f460b6a16d8a3ca7b
parent1e602941881f10aa04b7c231152541dbdb8e366e (diff)
parent771c4539fa0f64398c0837a81a15ee10679b2768 (diff)
downloadpytest-75ecd942944645c58baa12597b7204d6ca155159.tar.gz
Merge pull request #1689 from quodlibetor/autouse-docs
Document the interaction of autouse scopes
-rw-r--r--doc/en/fixture.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst
index 590649b56..3c7033f83 100644
--- a/doc/en/fixture.rst
+++ b/doc/en/fixture.rst
@@ -798,6 +798,10 @@ If we run it, we get two passing tests::
Here is how autouse fixtures work in other scopes:
+- autouse fixtures obey the ``scope=`` keyword-argument: if an autouse fixture
+ has ``scope='session'`` it will only be run once, no matter where it is
+ defined. ``scope='class'`` means it will be run once per class, etc.
+
- if an autouse fixture is defined in a test module, all its test
functions automatically use it.