Changeset f03b027 in sasview for sansmodels
- Timestamp:
- Mar 12, 2008 1:43:37 PM (17 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_nonshape.py
r914caf52 rf03b027 26 26 27 27 def setUp(self): 28 from sans.models.GuinierModel import GuinierModel28 from GuinierModel import GuinierModel 29 29 self.model= GuinierModel() 30 30 … … 34 34 35 35 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)) 37 37 38 38 def test2D(self): … … 55 55 value = self._func(2.0, 1.0, x)*self._func(2.0, 1.0, y) 56 56 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) 59 59 class TestPorod(unittest.TestCase): 60 60 """ … … 69 69 70 70 def setUp(self): 71 from sans.models.PorodModel import PorodModel71 from PorodModel import PorodModel 72 72 self.model= PorodModel() 73 73 self.model.setParam('c', 2.0) … … 89 89 value = self._func(2.0, 1.0)*self._func(2.0, 2.0) 90 90 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) 92 93 93 94 if __name__ == '__main__':
Note: See TracChangeset
for help on using the changeset viewer.