Skip to content
Snippets Groups Projects
Commit 143513ec authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Merge remote-tracking branch 'origin/master'

parents 10424729 8776b3c2
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,11 @@ TEST_FAILURE_TYPE = "UsageFailure"
# Package name
PACKAGE_NAME = "docs"
# No Test found error message
NO_TEST_ERROR = "\n*************************************************\n"\
"* No test code has been found in given file(s). * \n"\
"*************************************************"
#-------------------------------------------------------------------------------
# Define parts of lines that denote a document
DOCTEST_DOCUMENT_BEGIN = "Document:"
......@@ -283,7 +288,10 @@ class DocTestOutputParser(object):
continue
if line.startswith(DOCTEST_SUMMARY_TITLE): # end of tests
in_doc = False
cases.extend(self.__parse_document(document_txt))
if document_txt:
cases.extend(self.__parse_document(document_txt))
else:
raise RuntimeError(NO_TEST_ERROR)
document_txt = None
if in_doc and line != "":
document_txt.append(line)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment