Skip to content

Commit 1eb9fd3

Browse files
committed
Avoid duplicate tests.
1 parent 9cfbf20 commit 1eb9fd3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_syntax/extensions/test_md_in_html.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
License: BSD (see LICENSE.md for details).
2121
"""
2222

23+
from unittest import TestSuite
2324
from markdown.test_tools import TestCase
2425
from ..blocks.test_html_blocks import TestHTMLBlocks
2526

@@ -752,3 +753,12 @@ def test_md1_nested_footnote_ref(self):
752753
'</div>',
753754
extensions=['md_in_html', 'footnotes']
754755
)
756+
757+
758+
def load_tests(loader, tests, pattern):
759+
''' Ensure TestHTMLBlocks doesn't get run twice by excluding it here. '''
760+
suite = TestSuite()
761+
for test_class in [TestDefaultwMdInHTML, TestMdInHTML]:
762+
tests = loader.loadTestsFromTestCase(test_class)
763+
suite.addTests(tests)
764+
return suite

0 commit comments

Comments
 (0)