class TestHollowCylinder(unittest.TestCase):
    """ Unit tests for calculate_ER (Hollowcylinder model) """
    def setUp(self):
        from sas.models.HollowCylinderModel import HollowCylinderModel
        from sas.models.DiamCylFunc import DiamCylFunc
        self.comp = HollowCylinderModel()
        self.diam = DiamCylFunc()

    def test(self):
        """ Test 1D model for a Hollowcylinder """
        self.comp.setParam("radius", 20)
        self.comp.setParam("length", 400)
        self.diam.setParam("radius", 20)
        self.diam.setParam("length", 400)
        self.assertAlmostEqual(self.comp.calculate_ER(),
                               self.diam.run(0.1) / 2)
class TestHollowCylinder(unittest.TestCase):
    """ Unit tests for calculate_ER (Hollowcylinder model) """
    
    def setUp(self):
        from sas.models.HollowCylinderModel import HollowCylinderModel
        from sas.models.DiamCylFunc import DiamCylFunc
        self.comp = HollowCylinderModel()
        self.diam = DiamCylFunc()
        
    def test(self):
        """ Test 1D model for a Hollowcylinder """
        self.comp.setParam("radius", 20)
        self.comp.setParam("length",400)
        self.diam.setParam("radius", 20)
        self.diam.setParam("length",400)       
        self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2)        
 def setUp(self):
     from sas.models.HollowCylinderModel import HollowCylinderModel
     from sas.models.DiamCylFunc import DiamCylFunc
     self.comp = HollowCylinderModel()
     self.diam = DiamCylFunc()
 def setUp(self):
     from sas.models.HollowCylinderModel import HollowCylinderModel
     from sas.models.DiamCylFunc import DiamCylFunc
     self.comp = HollowCylinderModel()
     self.diam = DiamCylFunc()