Skip to content

Commit 37b7809

Browse files
committed
tests: Added Python Docstring to test new support
1 parent c629aca commit 37b7809

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/django_example/app/tests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,13 @@
44
# Create your tests here.
55
class DummyTestCase(TestCase):
66
def test_pass(self):
7+
"""Test Pass"""
8+
pass
9+
10+
def test_negative_comment1(self):
11+
"""Use a close comment XML tag -->"""
12+
pass
13+
14+
def test_negative_comment2(self):
15+
"""Check XML tag </testsuites>"""
716
pass

tests/django_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,16 @@ def _check_runner(self, runner):
5757
test_ids = [test.id() for test in suite]
5858
self.assertEqual(test_ids, [
5959
'app2.tests.DummyTestCase.test_pass',
60+
'app.tests.DummyTestCase.test_negative_comment1',
61+
'app.tests.DummyTestCase.test_negative_comment2',
6062
'app.tests.DummyTestCase.test_pass',
6163
])
6264
suite = runner.build_suite(test_labels=[])
6365
test_ids = [test.id() for test in suite]
6466
self.assertEqual(set(test_ids), set([
6567
'app.tests.DummyTestCase.test_pass',
68+
'app.tests.DummyTestCase.test_negative_comment1',
69+
'app.tests.DummyTestCase.test_negative_comment2',
6670
'app2.tests.DummyTestCase.test_pass',
6771
]))
6872

0 commit comments

Comments
 (0)