Changeset 24415e9 in sasview for sansmodels/src/sans/models/test
- Timestamp:
- Apr 9, 2009 4:00:13 PM (16 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:
- 87fbc60
- Parents:
- 56e1202
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_modelmultiplication.py
r8cfdd5e r24415e9 28 28 fixed=['radius.width'] 29 29 30 30 def test_multiplication_radius(self): 31 """ test multiplication model""" 32 from sans.models.MultiplicationModel import MultiplicationModel 33 from sans.models.SphereModel import SphereModel 34 from sans.models.HayterMSAStructure import HayterMSAStructure 35 my_sphere = SphereModel() 36 my_struct = HayterMSAStructure() 37 model1 = MultiplicationModel(my_sphere,my_struct) 38 self.assertEquals(model1.getParam("radius"), 39 my_struct.getParam("radius"), 40 my_sphere.getParam("radius")) 41 model2 = SphereModel() 42 x= 2 43 44 model1.setParam("radius", 60) 45 self.assertEqual(model1.getParam("radius"), 60) 46 a = model1.run(x) 47 self.assertEqual(a, 2.5723183020756634e-006) 48 model1.setParam("radius", 70) 49 b = model1.run(x) 50 self.assertNotEqual(a, b) 51 model1.setParam("radius", 60) 52 c = model1.run(x) 53 self.assertEqual(c, 2.5723183020756634e-006) 54 self.assertEqual(a, c) 55 56 57 58 31 59 def test_multiplication(self): 32 60 """ test multiplication model"""
Note: See TracChangeset
for help on using the changeset viewer.