diff options
| author | Jakub Paczkowski <jakub@paczkowski.eu> | 2015-11-07 14:57:56 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-02-17 09:44:18 -0500 |
| commit | d4dc775620fc57e962165eab98a77264e3dd16b2 (patch) | |
| tree | ef18bd2705ca738d087c4e725c489cffada1945d /tests/test_discovery_sample/tests_sample.py | |
| parent | 0db7e61076116c2d93d61f98ef31690542359e48 (diff) | |
Fixed #25735 -- Added support for test tags to DiscoverRunner.
Thanks Carl Meyer, Claude Paroz, and Simon Charette for review.
Diffstat (limited to 'tests/test_discovery_sample/tests_sample.py')
| -rw-r--r-- | tests/test_discovery_sample/tests_sample.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_discovery_sample/tests_sample.py b/tests/test_discovery_sample/tests_sample.py index eb977e44fb..53588709ea 100644 --- a/tests/test_discovery_sample/tests_sample.py +++ b/tests/test_discovery_sample/tests_sample.py @@ -2,6 +2,7 @@ import doctest from unittest import TestCase from django.test import SimpleTestCase, TestCase as DjangoTestCase +from django.test.utils import tag from . import doctests @@ -29,6 +30,18 @@ class EmptyTestCase(TestCase): pass +@tag('slow') +class TaggedTestCase(TestCase): + + @tag('fast') + def test_single_tag(self): + self.assertEqual(1, 1) + + @tag('fast', 'core') + def test_multiple_tags(self): + self.assertEqual(1, 1) + + def load_tests(loader, tests, ignore): tests.addTests(doctest.DocTestSuite(doctests)) return tests |
