diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2016-06-29 18:08:06 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 18:08:06 -0300 |
commit | 75ecd942944645c58baa12597b7204d6ca155159 (patch) | |
tree | a21b62fe08828d92ce6eff1f460b6a16d8a3ca7b | |
parent | 1e602941881f10aa04b7c231152541dbdb8e366e (diff) | |
parent | 771c4539fa0f64398c0837a81a15ee10679b2768 (diff) | |
download | pytest-75ecd942944645c58baa12597b7204d6ca155159.tar.gz |
Merge pull request #1689 from quodlibetor/autouse-docs
Document the interaction of autouse scopes
-rw-r--r-- | doc/en/fixture.rst | 4 |
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. |