add warning to skipping docs re marker inheritance

This commit is contained in:
Joe Hamman 2017-09-08 12:01:33 -07:00
parent 09349c344e
commit b2a8e06e4f
1 changed files with 11 additions and 7 deletions

View File

@ -118,6 +118,12 @@ You can use the ``skipif`` marker (as any other marker) on classes::
If the condition is ``True``, this marker will produce a skip result for
each of the test methods of that class.
.. warning::
The use of ``skipif`` on classes that use inheritance is strongly
discouraged. `A Known bug <https://github.com/pytest-dev/pytest/issues/568>`_
in pytest's markers may cause unexpected behavior in super classes.
If you want to skip all test functions of a module, you may use
the ``pytestmark`` name on the global level:
@ -346,5 +352,3 @@ test instances when using parametrize:
])
def test_increment(n, expected):
assert n + 1 == expected