Skip to content

Commit

Permalink
Add a test for multi-document output.
Browse files Browse the repository at this point in the history
Refs #9874
  • Loading branch information
martyngigg committed Aug 3, 2014
1 parent 75df644 commit 90c9043
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Code/Mantid/docs/sphinxext/mantiddoc/tests/test_doctest.py
Expand Up @@ -270,6 +270,16 @@ def test_mix_pass_fail_gives_expected_results(self):
self.assertEquals(expected_errors[idx], case.failure_descr)
self.assertEquals("algorithms.MixPassFail", case.classname)

def test_multi_document_text(self):
multi_doc = "\n".join(ALL_PASS_EX.splitlines()[:-6]) # hack off summary
multi_doc += ALL_FAIL_EX
parser = DocTestOutputParser(multi_doc, isfile = False)

self.assertTrue(hasattr(parser, "testsuite"))
suite = parser.testsuite
# The other checks should be sufficient if this passes
self.assertEquals(5, suite.ntests)

#========================= Failure cases ==================================

def test_no_document_start_gives_valueerror(self):
Expand Down

0 comments on commit 90c9043

Please sign in to comment.