doc: expand first sentence on fixtures into a paragraph (#6742)

This commit is contained in:
kpinc 2020-02-15 11:35:36 -06:00 committed by GitHub
parent 959e6b4f44
commit 9785ee438d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

1
changelog/6742.doc.rst Normal file
View File

@ -0,0 +1 @@
Expand first sentence on fixtures into a paragraph.

View File

@ -10,13 +10,19 @@ pytest fixtures: explicit, modular, scalable
.. _`xUnit`: https://en.wikipedia.org/wiki/XUnit .. _`xUnit`: https://en.wikipedia.org/wiki/XUnit
.. _`purpose of test fixtures`: https://en.wikipedia.org/wiki/Test_fixture#Software .. _`Software test fixtures`: https://en.wikipedia.org/wiki/Test_fixture#Software
.. _`Dependency injection`: https://en.wikipedia.org/wiki/Dependency_injection .. _`Dependency injection`: https://en.wikipedia.org/wiki/Dependency_injection
The `purpose of test fixtures`_ is to provide a fixed baseline `Software test fixtures`_ initialize test functions. They provide a
upon which tests can reliably and repeatedly execute. pytest fixtures fixed baseline so that tests execute reliably and produce consistent,
offer dramatic improvements over the classic xUnit style of setup/teardown repeatable, results. Initialization may setup services, state, or
functions: other operating environments. These are accessed by test functions
through arguments; for each fixture used by a test function there is
typically a parameter (named after the fixture) in the test function's
definition.
pytest fixtures offer dramatic improvements over the classic xUnit
style of setup/teardown functions:
* fixtures have explicit names and are activated by declaring their use * fixtures have explicit names and are activated by declaring their use
from test functions, modules, classes or whole projects. from test functions, modules, classes or whole projects.