def setUp(self): """This method is executed before all "check" methods.""" from code_saturne.Base.XMLengine import Case, XMLDocument from code_saturne.Base.XMLinitialize import XMLinit Tool.GuiParam.lang = 'en' self.case = Case(None) XMLinit(self.case).initialize() self.doc = XMLDocument()
class GasCombustionTestCase(unittest.TestCase): """ """ def setUp(self): """This method is executed before all "check" methods.""" from code_saturne.Base.XMLengine import Case, XMLDocument from code_saturne.Base.XMLinitialize import XMLinit Tool.GuiParam.lang = 'en' self.case = Case(None) XMLinit(self.case).initialize() self.doc = XMLDocument() def tearDown(self): """This method is executed after all "check" methods.""" del self.case del self.doc def xmlNodeFromString(self, string): """Private method to return a xml node from string""" return self.doc.parseString(string).root() def checkGasCombustionInstantiation(self): """ Check whether the gasCombustionModel class could be instantiated """ model = None model = GasCombustionModel(self.case) assert model != None, 'Could not instantiate GasCombustionModel'
class ElectricalTestCase(unittest.TestCase): """ """ def setUp(self): """This method is executed before all "check" methods.""" from code_saturne.Base.XMLengine import Case, XMLDocument from code_saturne.Base.XMLinitialize import XMLinit Tool.GuiParam.lang = 'en' self.case = Case(None) XMLinit(self.case).initialize() self.doc = XMLDocument() def tearDown(self): """This method is executed after all "check" methods.""" del self.case del self.doc def xmlNodeFromString(self, string): """Private method to return a xml node from string""" return self.doc.parseString(string).root() def checkElectricalInstantiation(self): """ Check whether the ElectricalModel class could be instantiated """ model = None model = ElectricalModel(self.case) assert model != None, 'Could not instantiate ElectricalModel'
def setUp(self): """This method is executed before all "check" methods.""" from code_saturne.Base.XMLengine import Case, XMLDocument from code_saturne.Base.XMLinitialize import XMLinit Tool.GuiParam.lang = 'en' self.case = Case(None) XMLinit(self.case).initialize() self.doc = XMLDocument()
class ModelTest(unittest.TestCase): """ Class beginning class test case of all pages """ def setUp(self): """This method is executed before all "check" methods.""" from code_saturne.Base.XMLengine import Case, XMLDocument from code_saturne.Base.XMLinitialize import XMLinit Toolbox.GuiParam.lang = 'en' self.case = Case(None) XMLinit(self.case) self.doc = XMLDocument() def tearDown(self): """This method is executed after all "check" methods.""" del self.case del self.doc def xmlNodeFromString(self, string): """Private method to return a xml node from string""" n = self.doc.parseString(string) self.doc.xmlCleanAllBlank(n) return self.doc.root()
class ModelTest(unittest.TestCase): """ Class beginning class test case of all pages """ def setUp(self): """This method is executed before all "check" methods.""" from code_saturne.Base.XMLengine import Case, XMLDocument from code_saturne.Base.XMLinitialize import XMLinit Toolbox.GuiParam.lang = 'en' self.case = Case(None) XMLinit(self.case) self.doc = XMLDocument() def tearDown(self): """This method is executed after all "check" methods.""" del self.case del self.doc def xmlNodeFromString(self, string): """Private method to return a xml node from string""" n = self.doc.parseString(string) self.doc.xmlCleanAllBlank(n) return self.doc.root()