示例#1
0
class TestGuinierPorod(unittest.TestCase):
    """
    Unit tests for GuinierPorod Model function
    """
    def setUp(self):
        from sas.models.GuinierPorodModel import GuinierPorodModel
        self.model = GuinierPorodModel()

    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), 995.112, 3)
        self.assertAlmostEqual(self.model.run(0.105363), 0.162904, 5)
        self.assertAlmostEqual(self.model.runXY(0.441623), 0.100854, 6)
class TestGuinierPorod(unittest.TestCase):
    """
    Unit tests for GuinierPorod Model function
    """
    def setUp(self):
        from sas.models.GuinierPorodModel import GuinierPorodModel 
        self.model= GuinierPorodModel()
        
    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), 995.112, 3)
        self.assertAlmostEqual(self.model.run(0.105363), 0.162904, 5)
        self.assertAlmostEqual(self.model.runXY(0.441623), 0.100854, 6)
示例#3
0
 def setUp(self):
     from sas.models.GuinierPorodModel import GuinierPorodModel
     self.model = GuinierPorodModel()
 def setUp(self):
     from sas.models.GuinierPorodModel import GuinierPorodModel 
     self.model= GuinierPorodModel()