Changeset e52eeea in sasview for sansmodels/src/sans/models


Ignore:
Timestamp:
Aug 3, 2011 9:01:39 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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
Message:

fixed minor error

File:
1 edited

Legend:

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

    rf1abc57 re52eeea  
    153153        self.gauss.setParam('sigma', 1.0) 
    154154        value = math.exp(-0.5) 
    155         self.assertEqual(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) 
    156156         
    157157class TestLorentzian(unittest.TestCase): 
     
    185185        self.assertEqual(self.lor.run(1.0), 1.0) 
    186186        value = 0.25/(1+.25) 
    187         self.assertEqual(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) 
    188188         
    189189class TestSin(unittest.TestCase): 
Note: See TracChangeset for help on using the changeset viewer.