Esempio n. 1
0
class TestCappedCylinder(unittest.TestCase):
    """
    Unit tests for CappedCylinder function
    """
    def setUp(self):
        from sas.models.CappedCylinderModel import CappedCylinderModel
        self.model = CappedCylinderModel()

    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), 1424.72, 2)
        self.assertAlmostEqual(self.model.run(0.215268), 0.360736, 4)
        self.assertAlmostEqual(self.model.runXY(0.414467), 0.110283, 5)
Esempio n. 2
0
class TestCappedCylinder(unittest.TestCase):
    """
    Unit tests for CappedCylinder function
    """
    def setUp(self):
        from sas.models.CappedCylinderModel import CappedCylinderModel
        self.model= CappedCylinderModel()
        
    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), 1424.72, 2)
        self.assertAlmostEqual(self.model.run(0.215268), 0.360736, 4)
        self.assertAlmostEqual(self.model.runXY(0.414467), 0.110283, 5)
Esempio n. 3
0
 def setUp(self):
     from sas.models.CappedCylinderModel import CappedCylinderModel
     self.model = CappedCylinderModel()
Esempio n. 4
0
 def setUp(self):
     from sas.models.CappedCylinderModel import CappedCylinderModel
     self.model= CappedCylinderModel()