class TestBroadPeak(unittest.TestCase): """ Unit tests for BroadPeak Model function """ def setUp(self): from sas.models.BroadPeakModel import BroadPeakModel self.model = BroadPeakModel() def test1D(self): # the values are from Igor pro calculation # the different digits are due to precision of q values self.assertAlmostEqual(self.model.run(0.001), 10000.5, 1) self.assertAlmostEqual(self.model.run(0.1501412), 1.47557, 5) self.assertAlmostEqual(self.model.runXY(0.4425284), 0.134093, 6)
class TestBroadPeak(unittest.TestCase): """ Unit tests for BroadPeak Model function """ def setUp(self): from sas.models.BroadPeakModel import BroadPeakModel self.model= BroadPeakModel() def test1D(self): # the values are from Igor pro calculation # the different digits are due to precision of q values self.assertAlmostEqual(self.model.run(0.001), 10000.5, 1) self.assertAlmostEqual(self.model.run(0.1501412), 1.47557, 5) self.assertAlmostEqual(self.model.runXY(0.4425284), 0.134093, 6)
def setUp(self): from sas.models.BroadPeakModel import BroadPeakModel self.model = BroadPeakModel()
def setUp(self): from sas.models.BroadPeakModel import BroadPeakModel self.model= BroadPeakModel()