- Timestamp:
- Oct 16, 2017 3:46:37 AM (7 years ago)
- Branches:
- 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
- Children:
- f54ce30, fca1f50
- Parents:
- a95c44b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
ra14a2b0 rc7358b2 342 342 self.assertEqual(self.widget.lstPoly.horizontalHeader().count(), 8) 343 343 self.assertFalse(self.widget.lstPoly.horizontalHeader().stretchLastSection()) 344 345 # Test tooltips 346 self.assertEqual(len(self.widget._poly_model.header_tooltips), 8) 347 348 header_tooltips = ['Select parameter for fitting', 349 'Enter polydispersity ratio (STD/mean). ' 350 'STD: standard deviation from the mean value', 351 'Enter minimum value for parameter', 352 'Enter maximum value for parameter', 353 'Enter number of points for parameter', 354 'Enter number of sigmas parameter', 355 'Select distribution function', 356 'Select filename with user-definable distribution'] 357 for column, tooltip in enumerate(header_tooltips): 358 self.assertEqual(self.widget._poly_model.headerData( column, 359 QtCore.Qt.Horizontal, QtCore.Qt.ToolTipRole), 360 header_tooltips[column]) 344 361 345 362 # Test presence of comboboxes in last column … … 478 495 self.assertFalse(self.widget.lstMagnetic.horizontalHeader().stretchLastSection()) 479 496 497 #Test tooltips 498 self.assertEqual(len(self.widget._magnet_model.header_tooltips), 5) 499 500 header_tooltips = ['Select parameter for fitting', 501 'Enter parameter value', 502 'Enter minimum value for parameter', 503 'Enter maximum value for parameter', 504 'Unit of the parameter'] 505 for column, tooltip in enumerate(header_tooltips): 506 self.assertEqual(self.widget._magnet_model.headerData(column, 507 QtCore.Qt.Horizontal, QtCore.Qt.ToolTipRole), 508 header_tooltips[column]) 509 480 510 # Test rows 481 511 for row in xrange(self.widget._magnet_model.rowCount()): … … 835 865 name_modified_param = str(self.widget._model_model.item(5, 0).text()) 836 866 867 # Check the model 868 self.assertEqual(self.widget._model_model.rowCount(), 6) 869 self.assertEqual(self.widget._model_model.columnCount(), 5) 870 871 # Test the header 872 #self.assertEqual(self.widget.lstParams.horizontalHeader().count(), 5) 873 #self.assertFalse(self.widget.lstParams.horizontalHeader().stretchLastSection()) 874 875 self.assertEqual(len(self.widget._model_model.header_tooltips), 5) 876 header_tooltips = ['Select parameter for fitting', 877 'Enter parameter value', 878 'Enter minimum value for parameter', 879 'Enter maximum value for parameter', 880 'Unit of the parameter'] 881 for column, tooltip in enumerate(header_tooltips): 882 self.assertEqual(self.widget._model_model.headerData(column, 883 QtCore.Qt.Horizontal, QtCore.Qt.ToolTipRole), 884 header_tooltips[column]) 885 837 886 # check that the value has been modified in kernel_module 838 887 self.assertEqual(new_value,
Note: See TracChangeset
for help on using the changeset viewer.