diff --git a/README.rst b/README.rst index f89bb8a3..90258144 100644 --- a/README.rst +++ b/README.rst @@ -51,7 +51,7 @@ your test, or tests, to be run: $ pytest --count=10 test_file.py -Each test collected by pytest will be run :code:`count` times. +Each pytest test function collected by pytest will be run :code:`count` times. If you want to mark a test in your code to be repeated a number of times, you can use the :code:`@pytest.mark.repeat(count)` decorator: @@ -88,6 +88,13 @@ For example: This will attempt to run test_file.py 1000 times, but will stop as soon as a failure occurs. +Doctests +-------- + +Doctests run once, even when :code:`--count` is greater than one. This applies +to doctests collected from Python modules or text files. In a mixed suite, +pytest test functions still repeat as usual. + UnitTest Style Tests --------------------