Changeset da9a0722 in sasview
- Timestamp:
- Jan 30, 2018 8:00:39 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:
- 5e66738
- Parents:
- 63319b0
- Location:
- src/sas/qtgui
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GUITests.py
r676f137 rda9a0722 57 57 from Perspectives.Fitting.UnitTesting import FittingOptionsTest 58 58 from Perspectives.Fitting.UnitTesting import MultiConstraintTest 59 from Perspectives.Fitting.UnitTesting import ComplexConstraintTest 59 60 from Perspectives.Fitting.UnitTesting import ConstraintWidgetTest 60 61 … … 118 119 unittest.makeSuite(MultiConstraintTest.MultiConstraintTest, 'test'), 119 120 unittest.makeSuite(ConstraintWidgetTest.ConstraintWidgetTest, 'test'), 121 unittest.makeSuite(ComplexConstraintTest.ComplexConstraintTest, 'test'), 120 122 121 123 # Invariant -
src/sas/qtgui/Perspectives/Fitting/ComplexConstraint.py
r0764593 rda9a0722 22 22 23 23 self.setupUi(self) 24 #self.setFixedSize(self.minimumSizeHint())25 24 self.setModal(True) 26 25 … … 34 33 self.setupWidgets() 35 34 self.setupSignals() 36 #self.setupTooltip()35 self.setupTooltip() 37 36 38 37 self.setFixedSize(self.minimumSizeHint()) … … 86 85 Tooltip for txtConstraint 87 86 """ 88 tooltip = "E.g.\n%s = 2.0 * (%s)\n" %(self.params[0], self.params[1]) 89 tooltip += "%s = sqrt(%s) + 5"%(self.params[0], self.params[1]) 87 p1 = self.tab_names[0] + ":" + self.cbParam1.currentText() 88 p2 = self.tab_names[1]+"."+self.cbParam2.currentText() 89 tooltip = "E.g.\n%s = 2.0 * (%s)\n" %(p1, p2) 90 tooltip += "%s = sqrt(%s) + 5"%(p1, p2) 90 91 self.txtConstraint.setToolTip(tooltip) 91 92 … … 130 131 self.cbParam2.setCurrentIndex(index1) 131 132 self.cbOperator.setCurrentIndex(indexOp) 132 #self.setupTooltip()133 self.setupTooltip() 133 134 134 135 def validateFormula(self): -
src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py
r17968c3 rda9a0722 357 357 Determines if the tab can be imported and included in the widget 358 358 """ 359 if not isinstance(tab, str): return False 359 360 if not self.currentType in tab: return False 360 361 object = ObjectLibrary.getObject(tab) … … 396 397 menu.addSeparator() 397 398 398 #menu.addAction(self.actionRemoveConstraint)399 399 if num_rows >= 2: 400 400 menu.addAction(self.actionMutualMultiConstrain) 401 401 402 402 # Define the callbacks 403 #self.actionConstrain.triggered.connect(self.addSimpleConstraint)404 #self.actionRemoveConstraint.triggered.connect(self.deleteConstraint)405 403 self.actionMutualMultiConstrain.triggered.connect(self.showMultiConstraint) 406 404 self.actionSelect.triggered.connect(self.selectModels) … … 443 441 444 442 # Define the callbacks 445 #self.actionConstrain.triggered.connect(self.addSimpleConstraint)446 443 self.actionRemoveConstraint.triggered.connect(self.deleteConstraint) 447 #self.actionMutualMultiConstrain.triggered.connect(self.showMultiConstraint)448 444 self.actionSelect.triggered.connect(self.selectConstraints) 449 445 self.actionDeselect.triggered.connect(self.deselectConstraints) -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/MultiConstraintTest.py
- Property mode changed from 100755 to 100644
r0595bb7 rda9a0722 2 2 import unittest 3 3 import numpy as np 4 import webbrowser 4 5 5 6 from unittest.mock import MagicMock … … 98 99 # log10( p2 ) + p2 99 100 self.assertTrue(self.widget.validateConstraint("log10( p2 ) + p2 ")) 101 102 def testOnHelp(self): 103 """ 104 Test the default help renderer 105 """ 106 webbrowser.open = MagicMock() 107 108 # invoke the tested method 109 self.widget.onHelp() 110 111 # see that webbrowser open was attempted 112 webbrowser.open.assert_called_once()
Note: See TracChangeset
for help on using the changeset viewer.