Skip to content

Commit

Permalink
Fix classname for tests part of fail suite.
Browse files Browse the repository at this point in the history
Refs #9874
  • Loading branch information
martyngigg committed Aug 4, 2014
1 parent a98b722 commit 1708cb2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Code/Mantid/docs/sphinxext/mantiddoc/doctest.py
Expand Up @@ -126,6 +126,8 @@
XUNIT_OUTPUT = "TEST-doctest.xml"
# Error type string
TEST_FAILURE_TYPE = "UsageFailure"
# Package name
PACKAGE_NAME = "docs"

#-------------------------------------------------------------------------------
# Define parts of lines that denote a document
Expand Down Expand Up @@ -265,7 +267,7 @@ def __parse(self, results):
document_txt.append(line)
# endfor
return TestSuiteReport(name="doctests", cases=cases,
package="docs")
package=PACKAGE_NAME)

def __parse_document(self, results):
"""
Expand Down Expand Up @@ -393,7 +395,7 @@ def __parse_failures(self, fullname, results, nfailed):
return failcases
# Parse successful tests that have unique names
start, end = success_markers
passcases = self.__parse_success(classname, results[start:end])
passcases = self.__parse_success(fullname, results[start:end])
# The final puzzle piece is that some tests that have failed
# may have the same names as those that have passed.
for line in results[end+1:]:
Expand All @@ -417,7 +419,7 @@ def __create_classname(self, fullname):
Args:
fullname (str): Fullname of document (including paths)
"""
return fullname.replace("/", ".")
return PACKAGE_NAME + "." + fullname

def __create_failure_report(self, classname, failure_desc):
"""
Expand Down

0 comments on commit 1708cb2

Please sign in to comment.