From 8629ef6a787d906bdfee0416c1ecc73e2660085d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 12 Mar 2018 19:43:04 -0300 Subject: [PATCH] Add missing ini options: markers, usefixtures and xfail_strict --- doc/en/reference.rst | 37 +++++++++++++++++++++++++++++++++++++ doc/en/skipping.rst | 3 +++ 2 files changed, 40 insertions(+) diff --git a/doc/en/reference.rst b/doc/en/reference.rst index f97233524..796c6ffcc 100644 --- a/doc/en/reference.rst +++ b/doc/en/reference.rst @@ -954,6 +954,18 @@ passed multiple times. The expected format is ``name=value``. For example:: junit_suite_name = my_suite +.. confval:: markers + + List of markers that are allowed in test functions, enforced when ``--strict`` command-line argument is used. + You can use a marker name per line, indented from the option name. + + .. code-block:: ini + + [pytest] + markers = + slow + serial + .. confval:: minversion Specifies a minimal pytest version required for running tests. @@ -1065,3 +1077,28 @@ passed multiple times. The expected format is ``name=value``. For example:: This tells pytest to only look for tests in ``testing`` and ``doc`` directories when executing from the root directory. + +.. confval:: usefixtures + + List of fixtures that will be applied to all test functions; this is semantically the same to apply + the ``@pytest.mark.usefixtures`` marker to all test functions. + + + .. code-block:: ini + + [pytest] + usefixtures = + clean_db + + +.. confval:: xfail_strict + + If set to ``True``, tests marked with ``@pytest.mark.xfail`` that actually succeed will by default fail the + test suite. + For more information, see :ref:`xfail strict tutorial`. + + + .. code-block:: ini + + [pytest] + xfail_strict = True diff --git a/doc/en/skipping.rst b/doc/en/skipping.rst index 195674199..9bac02c8c 100644 --- a/doc/en/skipping.rst +++ b/doc/en/skipping.rst @@ -238,6 +238,9 @@ internally by raising a known exception. **Reference**: :ref:`pytest.mark.xfail ref` + +.. _`xfail strict tutorial`: + ``strict`` parameter ~~~~~~~~~~~~~~~~~~~~