MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / TestResult

Class TestResult

tools/PythonExtensionChecker.py:792–833  ·  view source on GitHub ↗

A Result from a single test which either passed or failed. In addition, it contains information about the reason why the test failed, who is the maintainer and a unique testname.

Source from the content-addressed store, hash-verified

790 return cl
791
792class TestResult:
793 """ A Result from a single test which either passed or failed.
794
795 In addition, it contains information about the reason why the test failed,
796 who is the maintainer and a unique testname.
797 """
798
799 def __init__(self, passed = None, message=None, log_level=None, name=None):
800 self.message = message
801 self.passed = passed
802 self.name = name
803 self.log_level = log_level
804 self.maintainer = None
805 if log_level is None:
806 self.log_level = 0
807
808 def setMessage(self, message_):
809 self.message = message_
810
811 def getMessage(self):
812 return self.message
813
814 def getXMLName(self):
815 xmlname = self.name
816 xmlname = xmlname.replace("::", "_")
817 xmlname = re.sub('[^0-9A-Za-z_]', '', xmlname)
818 xmlname = xml_escape(xmlname) # still escape, just to be sure
819 return xmlname
820
821 def setPassed(self, passed):
822 self.passed = passed
823
824 def isPassed(self):
825 return self.passed
826
827 def setMaintainer(self, maintainer):
828 self.maintainer = maintainer
829
830 def getMaintainer(self):
831 if self.maintainer is None:
832 return "Nobody"
833 return self.maintainer
834
835class TestResultHandler:
836 """ A Container for all test results.

Callers 2

handle_member_definitionFunction · 0.85
checkPythonPxdHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected