Changeset 543d1bd in sasview for sansmodels/test
- Timestamp:
- Feb 27, 2012 6:27:47 PM (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:
- 996c643
- Parents:
- 015eb2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/test/utest_other_models.py
r9fafa39 r543d1bd 272 272 # self.assert_(numpy.isfinite(self.comp.run(0.0))) 273 273 274 274 275 class TestCoreShellBicelleModel(unittest.TestCase): 276 """ Unit tests for CoreShellBicelle Model""" 277 278 def setUp(self): 279 from sans.models.CoreShellCylinderModel import CoreShellCylinderModel 280 from sans.models.CoreShellBicelleModel import CoreShellBicelleModel 281 self.comp1 = CoreShellCylinderModel() 282 self.comp2 = CoreShellBicelleModel() 283 # Using the default values of CSBiselle is same as CSCylinder 284 285 def testcompare1D(self): 286 """ Test 1D model for a CoreShellBicelle Model""" 287 self.assertAlmostEqual(self.comp1.run(0.01), self.comp2.run(0.01), 8) 288 289 def testcompareEval_2D(self): 290 """ Test 2D model for a CoreShellBicelle with evalDistribution""" 291 self.assertAlmostEquals(self.comp1.runXY([0.4, 0.5]),self.comp2.runXY([0.4, 0.5]),8) 292 self.assertAlmostEquals(self.comp1.runXY([1.3,1.57]),self.comp2.runXY([1.3,1.57]),8) 293 294 275 295 class TestHollowCylinderModel(unittest.TestCase): 276 296 """ Unit tests for HollowCylinder Model""" … … 318 338 """ Test 2D model for a HollowCylinder with evalDistribution""" 319 339 self.assertAlmostEquals(self.comp.runXY([0.4, 0.5]),self.xy_matrix[0],8) 320 self.assertAlmostEquals(self.comp.runXY([1.3,1.57]),self.xy_matrix[1], 340 self.assertAlmostEquals(self.comp.runXY([1.3,1.57]),self.xy_matrix[1],8) 321 341 322 342 # No more singular point
Note: See TracChangeset
for help on using the changeset viewer.