diff --git a/doc/en/example/markers.txt b/doc/en/example/markers.txt index bb8e08b49..5559af92f 100644 --- a/doc/en/example/markers.txt +++ b/doc/en/example/markers.txt @@ -280,6 +280,14 @@ In this example the mark "foo" will apply to each of the three tests, whereas the "bar" mark is only applied to the second test. Skip and xfail marks can also be applied in this way, see :ref:`skip/xfail with parametrize`. +.. note:: + + If the data you are parametrizing happen to be single callables, you need to be careful + when marking these items. `pytest.mark.xfail(my_func)` won't work because it's also the + signature of a function being decorated. To resolve this ambiguity, you need to pass a + reason argument: + `pytest.mark.xfail(func_bar, reason="Issue#7")`. + .. _`adding a custom marker from a plugin`: