def main(self): """ Run the application. """ from pylith.utils.PetscManager import PetscManager manager = PetscManager() manager.initialize() unittest.TextTestRunner(verbosity=2).run(self._suite()) manager.finalize() return
def main(self, *args, **kwds): """ Run the application. """ from pylith.utils.PetscManager import PetscManager manager = PetscManager() manager.initialize() self._runTest() manager.finalize() return
def test_initfinal(self): """ Test initialize/finalize. """ from pylith.utils.PetscManager import PetscManager from pylith.utils.petsc import optionsSetValue manager = PetscManager() manager.options = [("vec_type", "seq")] manager.initialize() manager.finalize() return
def main(self): """ Run the application. """ from pylith.utils.PetscManager import PetscManager petsc = PetscManager() petsc.options = [("malloc_dump", "true")] petsc.initialize() unittest.TextTestRunner(verbosity=2).run(self._suite()) petsc.finalize() return
def main(self): """ Run the application. """ from pylith.utils.PetscManager import PetscManager petsc = PetscManager() petsc.options = self.petscOptions petsc.initialize() success = unittest.TextTestRunner(verbosity=2).run( self._suite()).wasSuccessful() petsc.finalize() if not success: import sys sys.exit(1) return
def main(self): """ Run the application. """ from pylith.utils.PetscManager import PetscManager petsc = PetscManager() petsc.options = self.petscOptions petsc.initialize() success = unittest.TextTestRunner(verbosity=2).run(self._suite()).wasSuccessful() petsc.finalize() if not success: import sys sys.exit(1) return
def main(self): """Run the application. """ if self.cov: self.cov.start() from pylith.utils.PetscManager import PetscManager petsc = PetscManager() petsc.initialize() success = unittest.TextTestRunner(verbosity=2).run( self._suite()).wasSuccessful() petsc.finalize() if not success: sys.exit(1) if self.cov: self.cov.stop() self.cov.save() self.cov.report() self.cov.xml_report(outfile="coverage.xml")
if PetscVersion.isRelease(): pass else: self.assertFalse(len(branch) == 0) return def test_petscDir(self): dir = PetscVersion.petscDir() self.assertFalse(len(dir) == 0) return def test_petscArch(self): arch = PetscVersion.petscArch() # Prefix builds set PETSC_ARCH to empty string, so no verification of string length. return if __name__ == "__main__": suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TestPetscVersion)) from pylith.utils.PetscManager import PetscManager petsc = PetscManager() petsc.initialize() success = unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() petsc.finalize() # End of file