self.assertEquals(phirhozElementRef.symbol, phirhozElement.symbol) self.assertEquals(phirhozElementRef.weightFraction, phirhozElement.weightFraction) self.assertEquals(phirhozElementRef.isIonizationShell_K, phirhozElement.isIonizationShell_K) self.assertEquals(phirhozElementRef.isIonizationShell_L, phirhozElement.isIonizationShell_L) self.assertEquals(phirhozElementRef.isIonizationShell_M, phirhozElement.isIonizationShell_M) #self.fail("Test if the testcase is working.") def getLineAndReference(): line = "Au, 100.0000000 % Ionization shells 0 1 1" phirhozElementRef = PhirhozElement.PhirhozElement() phirhozElementRef.symbol = 'Au' phirhozElementRef.weightFraction = 1.0 phirhozElementRef.isIonizationShell_K = False phirhozElementRef.isIonizationShell_L = True phirhozElementRef.isIonizationShell_M = True return line, phirhozElementRef if __name__ == '__main__': #pragma: no cover logging.getLogger().setLevel(logging.DEBUG) from pymcxray.Testings import runTestModuleWithCoverage runTestModuleWithCoverage(__file__, withCoverage=False)
""" TestCase class for the module `ComparisonModels`. """ def setUp(self): """ Setup method. """ unittest.TestCase.setUp(self) def tearDown(self): """ Teardown method. """ unittest.TestCase.tearDown(self) def testSkeleton(self): """ First test to check if the testcase is working with the testing framework. """ #self.fail("Test if the testcase is working.") self.assert_(True) if __name__ == '__main__': #pragma: no cover logging.getLogger().setLevel(logging.DEBUG) from pymcxray.Testings import runTestModuleWithCoverage runTestModuleWithCoverage(__file__)
lines = element.createLinesWithKey() self.assertEquals(linesRef, lines) linesRef = \ """AtomicNumber=7 WeightFraction=1.000000000000000 """.splitlines() element = Element.Element() element.atomicNumber = 7 element.massFraction = 1.0 lines = element.createLinesWithKey() self.assertEquals(linesRef, lines) linesRef = \ """AtomicNumber=56 WeightFraction=1.000000000000000 """.splitlines() element = Element.Element() element.atomicNumber = 56 element.massFraction = 1.0 lines = element.createLinesWithKey() self.assertEquals(linesRef, lines) #self.fail("Test if the testcase is working.") if __name__ == '__main__': #pragma: no cover logging.getLogger().setLevel(logging.DEBUG) from pymcxray.Testings import runTestModuleWithCoverage runTestModuleWithCoverage(__file__, withCoverage=True)