diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-04-12 11:42:06 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-04-12 11:43:10 +0200 |
| commit | d9f8cc12aeeb5309139a79d9b613fa405ebed36e (patch) | |
| tree | 02392fda6eb52ad65fe266ac4da919660381de08 /tests/test_discovery_sample/tests_sample.py | |
| parent | 3f48ca207130db502c8a9f8b7e6efa04453c4504 (diff) | |
[1.7.x] Fixed #22102 -- Made SimpleTestCase tests run before unittest.TestCase ones
Thanks aptiko for the report and Tim Graham for the review.
Backport of 3e3a7372f5 from master.
Diffstat (limited to 'tests/test_discovery_sample/tests_sample.py')
| -rw-r--r-- | tests/test_discovery_sample/tests_sample.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_discovery_sample/tests_sample.py b/tests/test_discovery_sample/tests_sample.py index d538771b0f..eb977e44fb 100644 --- a/tests/test_discovery_sample/tests_sample.py +++ b/tests/test_discovery_sample/tests_sample.py @@ -1,6 +1,9 @@ +import doctest from unittest import TestCase -from django.test import TestCase as DjangoTestCase +from django.test import SimpleTestCase, TestCase as DjangoTestCase + +from . import doctests class TestVanillaUnittest(TestCase): @@ -15,5 +18,17 @@ class TestDjangoTestCase(DjangoTestCase): self.assertEqual(1, 1) +class TestZimpleTestCase(SimpleTestCase): + # Z is used to trick this test case to appear after Vanilla in default suite + + def test_sample(self): + self.assertEqual(1, 1) + + class EmptyTestCase(TestCase): pass + + +def load_tests(loader, tests, ignore): + tests.addTests(doctest.DocTestSuite(doctests)) + return tests |
