Changeset 7fb471d in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Nov 9, 2017 8:41:56 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:
- 4992ff2
- Parents:
- cee5c78
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/27/17 08:49:35)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:56)
- Location:
- src/sas/qtgui/Perspectives
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rcee5c78 r7fb471d 572 572 model_row = item.row() 573 573 name_index = self._poly_model.index(model_row, 0) 574 parameter_name = str(name_index.data() .toString()).lower() # "distribution of sld" etc.574 parameter_name = str(name_index.data()).lower() # "distribution of sld" etc. 575 575 if "distribution of" in parameter_name: 576 576 # just the last word -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py
r464cd07 r7fb471d 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 r7fb471d 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 r7fb471d 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
r9ea43c82 r7fb471d 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 … … 394 394 395 395 # Test presence of comboboxes in last column 396 for row in xrange(self.widget._poly_model.rowCount()):396 for row in range(self.widget._poly_model.rowCount()): 397 397 func_index = self.widget._poly_model.index(row, 6) 398 398 self.assertTrue(isinstance(self.widget.lstPoly.indexWidget(func_index), QtGui.QComboBox)) … … 542 542 543 543 # Test rows 544 for row in xrange(self.widget._magnet_model.rowCount()):544 for row in range(self.widget._magnet_model.rowCount()): 545 545 func_index = self.widget._magnet_model.index(row, 0) 546 546 self.assertIn(':', self.widget._magnet_model.item(row, 0).text()) … … 981 981 982 982 # check that range of variation for this parameter has NOT been changed 983 print self.widget.kernel_module.details[name_modified_param]983 print(self.widget.kernel_module.details[name_modified_param]) 984 984 self.assertNotIn(new_value, self.widget.kernel_module.details[name_modified_param] ) 985 985 -
src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
rcee5c78 r7fb471d 180 180 # Add deferred callback for call return 181 181 d.addCallback(self.plotResult) 182 d.addErrback(self.plotFailed) 182 183 except Exception as ex: 183 184 # Set the button back to available … … 186 187 self.pushButton.setStyleSheet(self.style) 187 188 189 def plotFailed(self, reason): 190 """ 191 """ 192 print("plotFailed FAILED: ", reason) 193 pass 188 194 189 195 def plotResult(self, model):
Note: See TracChangeset
for help on using the changeset viewer.