15 import xml.etree.cElementTree
as etree
20 from .TestCase
import TestCase
29 def __init__ (self, testCaseName, moduleName=None):
32 TestCase.__init__(self, testCaseName)
37 def run (self, xmlNode):
39 raise Exception(
"No module name set for test %s." % (self.
_testCaseName_testCaseName))
41 TestCase.run(self, xmlNode)
50 def __testModule (self, moduleName):
51 if "testModule" in self.
_ctx_ctx.callableFunctions():
52 return self.
_ctx_ctx.call(
"testModule", [moduleName,])
65 availableModuleList = []
67 for packageIdentifier
in packageList:
68 availableModuleList.extend(mevis.MLAB.allModulesForPackageIdentifier(packageIdentifier))
71 testerName = TestHelper.getInstance().getGlobalContext().name
72 if testerName
in availableModuleList:
73 availableModuleList.remove(testerName)
77 for moduleName
in moduleList:
78 if moduleName
in availableModuleList:
80 modulesToTest.append(moduleName)
82 modulesNotToTest.append(moduleName)
83 return modulesToTest, modulesNotToTest
The implementation of the TestCase superclass for generic testing.
def run(self, xmlNode)
Prior to running the actual test the module name is set to the result node.
def __init__(self, testCaseName, moduleName=None)
The default constructor.
def getName(self)
Return the name of the test case.
def __testModule(self, moduleName)
def getModulesToTest(self, moduleList, packageList)
Get the list of modules to test.
The superclass for the different test case categories.