From 19ad5889353c7f5f2b65cc2acd346b7a9e95dfcd Mon Sep 17 00:00:00 2001 From: Xinbin Huang Date: Fri, 5 Jun 2020 04:10:16 -0700 Subject: [PATCH] Add reference to builtin markers to doc (#7321) Co-authored-by: Bruno Oliveira --- doc/en/mark.rst | 11 ++++++++--- doc/en/start_doc_server.sh | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 doc/en/start_doc_server.sh diff --git a/doc/en/mark.rst b/doc/en/mark.rst index 3899dab88..6fb665fdf 100644 --- a/doc/en/mark.rst +++ b/doc/en/mark.rst @@ -4,14 +4,19 @@ Marking test functions with attributes ====================================== By using the ``pytest.mark`` helper you can easily set -metadata on your test functions. There are -some builtin markers, for example: +metadata on your test functions. You can find the full list of builtin markers +in the :ref:`API Reference`. Or you can list all the markers, including +builtin and custom, using the CLI - :code:`pytest --markers`. +Here are some of the builtin markers: + +* :ref:`usefixtures ` - use fixtures on a test function or class +* :ref:`filterwarnings ` - filter certain warnings of a test function * :ref:`skip ` - always skip a test function * :ref:`skipif ` - skip a test function if a certain condition is met * :ref:`xfail ` - produce an "expected failure" outcome if a certain condition is met -* :ref:`parametrize ` to perform multiple calls +* :ref:`parametrize ` - perform multiple calls to the same test function. It's easy to create custom markers or to apply markers diff --git a/doc/en/start_doc_server.sh b/doc/en/start_doc_server.sh new file mode 100644 index 000000000..f68677409 --- /dev/null +++ b/doc/en/start_doc_server.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "${MY_DIR}"/_build/html || exit +python -m http.server 8000