Changeset 66d4370 in sasview for src/sas/qtgui/Perspectives/Fitting/UnitTesting
- Timestamp:
- Sep 6, 2018 9:03:25 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 9d23e4c, 40975f8, 73665a8
- Parents:
- dda8f16
- git-author:
- Piotr Rozyczko <rozyczko@…> (09/06/18 09:01:55)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (09/06/18 09:03:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r605d944 r66d4370 445 445 self.assertEqual(self.widget.kernel_module.details['radius_bell'][1], 1.0) 446 446 447 #self.widget.show() 448 #QtWidgets.QApplication.exec_() 449 447 450 # Change the number of points 448 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.npts'), 35)451 self.assertEqual(self.widget.poly_params['radius_bell.npts'], 35) 449 452 self.widget._poly_model.item(0,4).setText("22") 450 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.npts'), 22)453 self.assertEqual(self.widget.poly_params['radius_bell.npts'], 22) 451 454 # try something stupid 452 455 self.widget._poly_model.item(0,4).setText("butt") 453 456 # see that this didn't annoy the control at all 454 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.npts'), 22)457 self.assertEqual(self.widget.poly_params['radius_bell.npts'], 22) 455 458 456 459 # Change the number of sigmas 457 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.nsigmas'), 3)460 self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 3) 458 461 self.widget._poly_model.item(0,5).setText("222") 459 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.nsigmas'), 222)462 self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 222) 460 463 # try something stupid again 461 464 self.widget._poly_model.item(0,4).setText("beer") 462 465 # no efect 463 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.nsigmas'), 222)466 self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 222) 464 467 465 468 def testOnPolyComboIndexChange(self): … … 482 485 self.widget.onPolyComboIndexChange('rectangle', 0) 483 486 # check values 484 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.npts'), 35)485 self.assertAlmostEqual(self.widget. kernel_module.getParam('radius_bell.nsigmas'), 1.73205, 5)487 self.assertEqual(self.widget.poly_params['radius_bell.npts'], 35) 488 self.assertAlmostEqual(self.widget.poly_params['radius_bell.nsigmas'], 1.73205, 5) 486 489 # Change the index 487 490 self.widget.onPolyComboIndexChange('lognormal', 0) 488 491 # check values 489 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.npts'), 80)490 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.nsigmas'), 8)492 self.assertEqual(self.widget.poly_params['radius_bell.npts'], 80) 493 self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 8) 491 494 # Change the index 492 495 self.widget.onPolyComboIndexChange('schulz', 0) 493 496 # check values 494 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.npts'), 80)495 self.assertEqual(self.widget. kernel_module.getParam('radius_bell.nsigmas'), 8)497 self.assertEqual(self.widget.poly_params['radius_bell.npts'], 80) 498 self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 8) 496 499 497 500 # mock up file load
Note: See TracChangeset
for help on using the changeset viewer.