summaryrefslogtreecommitdiff
path: root/tests/test_runner_apps
diff options
context:
space:
mode:
authorWill Ayd <william.ayd@icloud.com>2017-12-01 11:00:45 -0500
committerTim Graham <timograham@gmail.com>2018-01-08 20:57:33 -0500
commit09530e61a0035192ca8bcdebc5ead13d14c16eb0 (patch)
treecd9b31edf7f69adf3e64ae0e54e31a37e92914a5 /tests/test_runner_apps
parentacd3baf2ae3f74846731447df66e8c3ce7a772f7 (diff)
downloaddjango-09530e61a0035192ca8bcdebc5ead13d14c16eb0.tar.gz
Fixed #28869 -- Made tagged test classes and methods inherit tags from parents.
Diffstat (limited to 'tests/test_runner_apps')
-rw-r--r--tests/test_runner_apps/tagged/tests_inheritance.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/test_runner_apps/tagged/tests_inheritance.py b/tests/test_runner_apps/tagged/tests_inheritance.py
new file mode 100644
index 0000000000..59e564202d
--- /dev/null
+++ b/tests/test_runner_apps/tagged/tests_inheritance.py
@@ -0,0 +1,29 @@
+from unittest import TestCase
+
+from django.test import tag
+
+
+@tag('foo')
+class FooBase(TestCase):
+ pass
+
+
+class Foo(FooBase):
+
+ def test_no_new_tags(self):
+ pass
+
+ @tag('baz')
+ def test_new_func_tag(self):
+ pass
+
+
+@tag('bar')
+class FooBar(FooBase):
+
+ def test_new_class_tag_only(self):
+ pass
+
+ @tag('baz')
+ def test_new_class_and_func_tags(self):
+ pass