diff --git a/changelog/3928.doc.rst b/changelog/3928.doc.rst new file mode 100644 index 000000000..d61b110ae --- /dev/null +++ b/changelog/3928.doc.rst @@ -0,0 +1 @@ +Add possible values for fixture scope to docs. diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index 8ea13c7f4..e48e055fe 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -171,6 +171,7 @@ to cause the decorated ``smtp_connection`` fixture function to only be invoked once per test *module* (the default is to invoke once per test *function*). Multiple test functions in a test module will thus each receive the same ``smtp_connection`` fixture instance, thus saving time. +Possible values for ``scope`` are: ``function``, ``class``, ``module``, ``package`` or ``session``. The next example puts the fixture function into a separate ``conftest.py`` file so that tests from multiple test modules in the directory can