Skip to content

Commit 75ecd94

Browse files
authored
Merge pull request #1689 from quodlibetor/autouse-docs
Document the interaction of autouse scopes
2 parents 1e60294 + 771c453 commit 75ecd94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/en/fixture.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,10 @@ If we run it, we get two passing tests::
798798

799799
Here is how autouse fixtures work in other scopes:
800800

801+
- autouse fixtures obey the ``scope=`` keyword-argument: if an autouse fixture
802+
has ``scope='session'`` it will only be run once, no matter where it is
803+
defined. ``scope='class'`` means it will be run once per class, etc.
804+
801805
- if an autouse fixture is defined in a test module, all its test
802806
functions automatically use it.
803807

0 commit comments

Comments
 (0)