Changeset f03b027 in sasview for sansmodels


Ignore:
Timestamp:
Mar 12, 2008 1:43:37 PM (17 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
d56a520
Parents:
914caf52
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/test/utest_nonshape.py

    r914caf52 rf03b027  
    2626     
    2727    def setUp(self): 
    28         from sans.models.GuinierModel import GuinierModel 
     28        from GuinierModel import GuinierModel 
    2929        self.model= GuinierModel() 
    3030         
     
    3434         
    3535        self.assertEqual(self.model.run(0.0), math.exp(2.0)) 
    36         self.assertEqual(self.model.run(2.0), math.exp(2.0+1.0*2.0)) 
     36        self.assertEqual(self.model.run(2.0), math.exp(2.0+1.0*(2.0)**2)) 
    3737         
    3838    def test2D(self): 
     
    5555        value = self._func(2.0, 1.0, x)*self._func(2.0, 1.0, y) 
    5656         
    57         self.assertEqual(self.model.run([r, phi]), value) 
    58          
     57        #self.assertEqual(self.model.run([r, phi]), value) 
     58        self.assertAlmostEquals(self.model.run([r, phi]), value,1) 
    5959class TestPorod(unittest.TestCase): 
    6060    """ 
     
    6969     
    7070    def setUp(self): 
    71         from sans.models.PorodModel import PorodModel 
     71        from PorodModel import PorodModel 
    7272        self.model= PorodModel() 
    7373        self.model.setParam('c', 2.0)         
     
    8989        value = self._func(2.0, 1.0)*self._func(2.0, 2.0) 
    9090         
    91         self.assertEqual(self.model.run([r, phi]), value) 
     91        #self.assertEqual(self.model.run([r, phi]), value) 
     92        self.assertAlmostEquals(self.model.run([r, phi]), value,1) 
    9293         
    9394if __name__ == '__main__': 
Note: See TracChangeset for help on using the changeset viewer.