Document the interaction of autouse scopes

I wouldn't have even attempted what I did to cause #1688 if this had
been there.
This commit is contained in:
Brandon W Maister 2016-06-29 16:51:35 -04:00
parent 1e60294188
commit 771c4539fa
1 changed files with 4 additions and 0 deletions

View File

@ -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.