From 84c4b643547b9fc09c8a2715a2b906d7a1844195 Mon Sep 17 00:00:00 2001 From: Yutaro Ikeda Date: Wed, 5 Aug 2020 03:30:08 +0900 Subject: [PATCH] Better document -k partial matching (#7610) --- doc/en/example/markers.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/en/example/markers.rst b/doc/en/example/markers.rst index 99e3386b8..3d55f9ebb 100644 --- a/doc/en/example/markers.rst +++ b/doc/en/example/markers.rst @@ -201,6 +201,11 @@ Or to select "http" and "quick" tests: You can use ``and``, ``or``, ``not`` and parentheses. +In addition to the test's name, ``-k`` also matches the names of the test's parents (usually, the name of the file and class it's in), +attributes set on the test function, markers applied to it or its parents and any :attr:`extra keywords <_pytest.nodes.Node.extra_keyword_matches>` +explicitly added to it or its parents. + + Registering markers -------------------------------------