diff --git a/doc/en/customize.txt b/doc/en/customize.txt index d436a0672..99fd8ffc8 100644 --- a/doc/en/customize.txt +++ b/doc/en/customize.txt @@ -121,6 +121,8 @@ Builtin configuration file options .. confval:: python_functions One or more name prefixes determining which test functions - and methods are considered as test modules. + and methods are considered as test modules. Note that this + has no effect on methods that live on a ``unittest.TestCase`` + derived class. See :ref:`change naming conventions` for examples. diff --git a/doc/en/example/pythoncollection.txt b/doc/en/example/pythoncollection.txt index abf6340c0..311140c91 100644 --- a/doc/en/example/pythoncollection.txt +++ b/doc/en/example/pythoncollection.txt @@ -53,6 +53,12 @@ then the test collection looks like this:: ============================= in 0.01 seconds ============================= +.. note:: + + the ``python_functions`` and ``python_classes`` has no effect + for ``unittest.TestCase`` test discovery because pytest delegates + detection of test case methods to unittest code. + Interpreting cmdline arguments as Python packages -----------------------------------------------------