2014-04-12 17:42:06 +08:00
|
|
|
import doctest
|
2013-07-02 03:49:11 +08:00
|
|
|
from unittest import TestCase
|
2013-05-11 11:08:45 +08:00
|
|
|
|
2014-04-12 17:42:06 +08:00
|
|
|
from django.test import SimpleTestCase, TestCase as DjangoTestCase
|
|
|
|
|
|
|
|
from . import doctests
|
2013-05-11 11:08:45 +08:00
|
|
|
|
|
|
|
|
2013-07-02 03:49:11 +08:00
|
|
|
class TestVanillaUnittest(TestCase):
|
2013-05-11 11:08:45 +08:00
|
|
|
|
|
|
|
def test_sample(self):
|
|
|
|
self.assertEqual(1, 1)
|
|
|
|
|
|
|
|
|
|
|
|
class TestDjangoTestCase(DjangoTestCase):
|
|
|
|
|
|
|
|
def test_sample(self):
|
|
|
|
self.assertEqual(1, 1)
|
2013-12-17 00:04:28 +08:00
|
|
|
|
|
|
|
|
2014-04-12 17:42:06 +08:00
|
|
|
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)
|
|
|
|
|
|
|
|
|
2013-12-17 00:04:28 +08:00
|
|
|
class EmptyTestCase(TestCase):
|
|
|
|
pass
|
2014-04-12 17:42:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
def load_tests(loader, tests, ignore):
|
|
|
|
tests.addTests(doctest.DocTestSuite(doctests))
|
|
|
|
return tests
|