summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/spelling_wordlist1
-rw-r--r--docs/topics/testing/tools.txt19
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist
index 34754bde76..20508bcdfd 100644
--- a/docs/spelling_wordlist
+++ b/docs/spelling_wordlist
@@ -695,6 +695,7 @@ subviews
subwidget
subwidgets
superclass
+superclasses
superset
swappable
symlink
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index d349efe7a0..65d1fb463b 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -1619,6 +1619,25 @@ You can also tag a test case::
class SampleTestCase(TestCase):
...
+Subclasses inherit tags from superclasses, and methods inherit tags from their
+class. Given::
+
+ @tag('foo')
+ class SampleTestCaseChild(SampleTestCase):
+
+ @tag('bar')
+ def test(self):
+ ...
+
+``SampleTestCaseChild.test`` will be labeled with ``'slow'``, ``'core'``,
+``'bar'``, and ``'foo'``.
+
+.. versionchanged:: 2.1
+
+ In older versions, tagged tests don't inherit tags from classes, and
+ tagged subclasses don't inherit tags from superclasses. For example,
+ ``SampleTestCaseChild.test`` is labeled only with ``'bar'``.
+
Then you can choose which tests to run. For example, to run only fast tests:
.. code-block:: console