Skip to content

Commit 771c453

Browse files
committed
Document the interaction of autouse scopes
I wouldn't have even attempted what I did to cause #1688 if this had been there.
1 parent 1e60294 commit 771c453

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)