class TestTwoPowerLaw(unittest.TestCase): """ Unit tests for TwoPowerLaw Model function """ def setUp(self): from sas.models.TwoPowerLawModel import TwoPowerLawModel self.model = TwoPowerLawModel() def test1D(self): # the values are from Igor pro calculation # the different digits are due to precision of q values self.assertEqual(self.model.run(0.001), 1000) self.assertAlmostEqual(self.model.run(0.150141), 0.125945, 5) self.assertAlmostEqual(self.model.runXY(0.442528), 0.00166884, 7)
class TestTwoPowerLaw(unittest.TestCase): """ Unit tests for TwoPowerLaw Model function """ def setUp(self): from sas.models.TwoPowerLawModel import TwoPowerLawModel self.model= TwoPowerLawModel() def test1D(self): # the values are from Igor pro calculation # the different digits are due to precision of q values self.assertEqual(self.model.run(0.001), 1000) self.assertAlmostEqual(self.model.run(0.150141), 0.125945, 5) self.assertAlmostEqual(self.model.runXY(0.442528), 0.00166884, 7)
def setUp(self): from sas.models.TwoPowerLawModel import TwoPowerLawModel self.model = TwoPowerLawModel()
def setUp(self): from sas.models.TwoPowerLawModel import TwoPowerLawModel self.model= TwoPowerLawModel()