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

    def test(self):
        """ Test 1D model for a StackedDisks """
        self.comp.setParam("radius", 3000)
        self.comp.setParam("n_stacking", 2)
        self.comp.setParam("core_thick", 10)
        self.comp.setParam("layer_thick", 15)
        self.diam.setParam("radius", 3000)
        self.diam.setParam("length", 80)
        self.assertAlmostEqual(self.comp.calculate_ER(),
                               self.diam.run(0.1) / 2)
class TestStackedDisksModel(unittest.TestCase):
    """ Unit tests for calculate_ER (StackedDisks model) """
    
    def setUp(self):
        from sas.models.StackedDisksModel import StackedDisksModel
        from sas.models.DiamCylFunc import DiamCylFunc
        self.comp = StackedDisksModel()
        self.diam = DiamCylFunc()
        
    def test(self):
        """ Test 1D model for a StackedDisks """
        self.comp.setParam("radius", 3000)
        self.comp.setParam("n_stacking", 2)
        self.comp.setParam("core_thick",10)
        self.comp.setParam("layer_thick", 15)
        self.diam.setParam("radius", 3000)
        self.diam.setParam("length",80)       
        self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2)  
 def setUp(self):
     from sas.models.StackedDisksModel import StackedDisksModel
     from sas.models.DiamCylFunc import DiamCylFunc
     self.comp = StackedDisksModel()
     self.diam = DiamCylFunc()
 def setUp(self):
     from sas.models.StackedDisksModel import StackedDisksModel
     from sas.models.DiamCylFunc import DiamCylFunc
     self.comp = StackedDisksModel()
     self.diam = DiamCylFunc()