From 9785ee438de88532c5618368b830482945d5afe9 Mon Sep 17 00:00:00 2001 From: kpinc Date: Sat, 15 Feb 2020 11:35:36 -0600 Subject: [PATCH] doc: expand first sentence on fixtures into a paragraph (#6742) --- changelog/6742.doc.rst | 1 + doc/en/fixture.rst | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 changelog/6742.doc.rst diff --git a/changelog/6742.doc.rst b/changelog/6742.doc.rst new file mode 100644 index 000000000..b33d16239 --- /dev/null +++ b/changelog/6742.doc.rst @@ -0,0 +1 @@ +Expand first sentence on fixtures into a paragraph. diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index b54a12731..be071302a 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -10,13 +10,19 @@ pytest fixtures: explicit, modular, scalable .. _`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 -The `purpose of test fixtures`_ is to provide a fixed baseline -upon which tests can reliably and repeatedly execute. pytest fixtures -offer dramatic improvements over the classic xUnit style of setup/teardown -functions: +`Software test fixtures`_ initialize test functions. They provide a +fixed baseline so that tests execute reliably and produce consistent, +repeatable, results. Initialization may setup services, state, or +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 from test functions, modules, classes or whole projects.