diff --git a/doc/en/assert.rst b/doc/en/assert.rst index 5ece98e96..a3a34a9c6 100644 --- a/doc/en/assert.rst +++ b/doc/en/assert.rst @@ -98,7 +98,7 @@ and if you need to have access to the actual exception info you may use: f() assert "maximum recursion" in str(excinfo.value) -``excinfo`` is a ``ExceptionInfo`` instance, which is a wrapper around +``excinfo`` is an ``ExceptionInfo`` instance, which is a wrapper around the actual exception raised. The main attributes of interest are ``.type``, ``.value`` and ``.traceback``. diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index b529996ed..a4e262c2f 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -179,7 +179,7 @@ In the failure traceback we see that the test function was called with a function. The test function fails on our deliberate ``assert 0``. Here is the exact protocol used by ``pytest`` to call the test function this way: -1. pytest :ref:`finds ` the ``test_ehlo`` because +1. pytest :ref:`finds ` the test ``test_ehlo`` because of the ``test_`` prefix. The test function needs a function argument named ``smtp_connection``. A matching fixture function is discovered by looking for a fixture-marked function named ``smtp_connection``. @@ -859,7 +859,7 @@ be used with ``-k`` to select specific cases to run, and they will also identify the specific case when one is failing. Running pytest with ``--collect-only`` will show the generated IDs. -Numbers, strings, booleans and None will have their usual string +Numbers, strings, booleans and ``None`` will have their usual string representation used in the test ID. For other objects, pytest will make a string based on the argument name. It is possible to customise the string used in a test ID for a certain fixture value by using the @@ -898,7 +898,7 @@ the string used in a test ID for a certain fixture value by using the The above shows how ``ids`` can be either a list of strings to use or a function which will be called with the fixture value and then has to return a string to use. In the latter case if the function -return ``None`` then pytest's auto-generated ID will be used. +returns ``None`` then pytest's auto-generated ID will be used. Running the above tests results in the following test IDs being used: diff --git a/doc/en/parametrize.rst b/doc/en/parametrize.rst index 29223e28e..1e356ebb3 100644 --- a/doc/en/parametrize.rst +++ b/doc/en/parametrize.rst @@ -133,7 +133,7 @@ Let's run this: ======================= 2 passed, 1 xfailed in 0.12s ======================= The one parameter set which caused a failure previously now -shows up as an "xfailed (expected to fail)" test. +shows up as an "xfailed" (expected to fail) test. In case the values provided to ``parametrize`` result in an empty list - for example, if they're dynamically generated by some function - the behaviour of