Changeset 99ea1b0 in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- Oct 27, 2017 8:49:35 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:
- 0849aec
- Parents:
- 895e7359
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r895e7359 r99ea1b0 566 566 model_row = item.row() 567 567 name_index = self._poly_model.index(model_row, 0) 568 parameter_name = str(name_index.data() .toString()).lower() # "distribution of sld" etc.568 parameter_name = str(name_index.data()).lower() # "distribution of sld" etc. 569 569 if "distribution of" in parameter_name: 570 570 # just the last word -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py
r464cd07 r99ea1b0 3 3 4 4 import numpy 5 from mock import MagicMock5 from unittest.mock import MagicMock 6 6 7 7 # set up import paths -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py
r464cd07 r99ea1b0 6 6 from PyQt4 import QtWebKit 7 7 8 from mock import MagicMock8 from unittest.mock import MagicMock 9 9 10 10 # set up import paths -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
r464cd07 r99ea1b0 6 6 from PyQt4 import QtTest 7 7 from PyQt4 import QtCore 8 from mock import MagicMock8 from unittest.mock import MagicMock 9 9 10 10 # set up import paths -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
- Property mode changed from 100644 to 100755
rc7358b2 r99ea1b0 6 6 from PyQt4 import QtTest 7 7 from PyQt4 import QtCore 8 from mock import MagicMock8 from unittest.mock import MagicMock 9 9 from twisted.internet import threads 10 10 … … 60 60 61 61 #Test loading from json categories 62 category_list = fittingWindow.master_category_dict.keys()62 category_list = list(fittingWindow.master_category_dict.keys()) 63 63 64 64 for category in category_list: … … 93 93 fittingWindow.SASModelToQModel("cylinder") 94 94 pd_index = fittingWindow.lstPoly.model().index(0,0) 95 self.assertEqual(str(pd_index.data() .toString()), "Distribution of radius")95 self.assertEqual(str(pd_index.data()), "Distribution of radius") 96 96 pd_index = fittingWindow.lstPoly.model().index(1,0) 97 self.assertEqual(str(pd_index.data() .toString()), "Distribution of length")97 self.assertEqual(str(pd_index.data()), "Distribution of length") 98 98 99 99 # test the delegate a bit 100 100 delegate = fittingWindow.lstPoly.itemDelegate() 101 101 self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 5) 102 self.assertEqual(delegate.editableParameters(), [ 2, 3, 4, 5])102 self.assertEqual(delegate.editableParameters(), [1, 2, 3, 4, 5]) 103 103 self.assertEqual(delegate.poly_function, 6) 104 104 self.assertIsInstance(delegate.combo_updated, QtCore.pyqtBoundSignal) … … 361 361 362 362 # Test presence of comboboxes in last column 363 for row in xrange(self.widget._poly_model.rowCount()):363 for row in range(self.widget._poly_model.rowCount()): 364 364 func_index = self.widget._poly_model.index(row, 6) 365 365 self.assertTrue(isinstance(self.widget.lstPoly.indexWidget(func_index), QtGui.QComboBox)) … … 509 509 510 510 # Test rows 511 for row in xrange(self.widget._magnet_model.rowCount()):511 for row in range(self.widget._magnet_model.rowCount()): 512 512 func_index = self.widget._magnet_model.index(row, 0) 513 513 self.assertIn(':', self.widget._magnet_model.item(row, 0).text()) … … 889 889 890 890 # check that range of variation for this parameter has NOT been changed 891 print self.widget.kernel_module.details[name_modified_param]891 print(self.widget.kernel_module.details[name_modified_param]) 892 892 self.assertNotIn(new_value, self.widget.kernel_module.details[name_modified_param] ) 893 893
Note: See TracChangeset
for help on using the changeset viewer.