Changeset e52eeea in sasview for sansmodels/src/sans/models
- Timestamp:
- Aug 3, 2011 11:01:39 AM (13 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:
- 49c92de
- Parents:
- 8677607
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_models.py
rf1abc57 re52eeea 153 153 self.gauss.setParam('sigma', 1.0) 154 154 value = math.exp(-0.5) 155 self.assert Equal(self.gauss.run([math.sqrt(8.0), math.pi/4.0]), 2.0*2.0*value*value)155 self.assertAlmostEqual(self.gauss.run([math.sqrt(8.0), math.pi/4.0]), 2.0*2.0*value*value, 5) 156 156 157 157 class TestLorentzian(unittest.TestCase): … … 185 185 self.assertEqual(self.lor.run(1.0), 1.0) 186 186 value = 0.25/(1+.25) 187 self.assert Equal(self.lor.run([math.sqrt(8.0), math.pi/4.0]), value*value)187 self.assertAlmostEqual(self.lor.run([math.sqrt(8.0), math.pi/4.0]), value*value, 5) 188 188 189 189 class TestSin(unittest.TestCase):
Note: See TracChangeset
for help on using the changeset viewer.