Skip to content

Commit

Permalink
Avoid duplicate tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
waylan committed Sep 15, 2020
1 parent 9cfbf20 commit 1eb9fd3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_syntax/extensions/test_md_in_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
License: BSD (see LICENSE.md for details).
"""

from unittest import TestSuite
from markdown.test_tools import TestCase
from ..blocks.test_html_blocks import TestHTMLBlocks

Expand Down Expand Up @@ -752,3 +753,12 @@ def test_md1_nested_footnote_ref(self):
'</div>',
extensions=['md_in_html', 'footnotes']
)


def load_tests(loader, tests, pattern):
''' Ensure TestHTMLBlocks doesn't get run twice by excluding it here. '''
suite = TestSuite()
for test_class in [TestDefaultwMdInHTML, TestMdInHTML]:
tests = loader.loadTestsFromTestCase(test_class)
suite.addTests(tests)
return suite

0 comments on commit 1eb9fd3

Please sign in to comment.