- Timestamp:
- Mar 29, 2019 12:11:34 PM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_opencl
- Children:
- 7a1481f
- Parents:
- c02721c4
- Location:
- src/sas/qtgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py
rc02721c4 r6edd344 13 13 14 14 # Local 15 from sas.qtgui.Calculators.SldPanel import SldResult15 #from sas.qtgui.Calculators.SldPanel import SldResult 16 16 from sas.qtgui.Calculators.SldPanel import SldPanel 17 from sas.qtgui.Calculators.SldPanel import sldAlgorithm17 from sas.qtgui.Calculators.SldPanel import neutronSldAlgorithm, xraySldAlgorithm 18 18 from sas.qtgui.Utilities.GuiUtils import FormulaValidator 19 19 … … 22 22 if not QtWidgets.QApplication.instance(): 23 23 app = QtWidgets.QApplication(sys.argv) 24 25 class SldResultTest(unittest.TestCase):26 """ Test the simple container class"""27 def testObjectSize(self):28 results = SldResult(0.0, 0.0, 0.0, 0.0, 0.0, 0.0,29 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)30 self.assertEqual(sys.getsizeof(results), 56)31 24 32 25 … … 38 31 wavelength = 6.0 39 32 40 results = sldAlgorithm( molecular_formula,33 results = neutronSldAlgorithm( molecular_formula, 41 34 mass_density, 42 35 wavelength) 43 self.assertIsInstance(results, SldResult)36 #self.assertIsInstance(results, SldResult) 44 37 self.assertAlmostEqual(results.neutron_length, 0.175463, 5) 45 38 self.assertAlmostEqual(results.neutron_inc_xs, 5.365857, 5) … … 51 44 wavelength = 666.0 52 45 53 results = sldAlgorithm( molecular_formula,46 results = neutronSldAlgorithm( molecular_formula, 54 47 mass_density, 55 48 wavelength) 56 self.assertIsInstance(results, SldResult)49 #self.assertIsInstance(results, SldResult) 57 50 self.assertAlmostEqual(results.neutron_length, 0.059402, 5) 58 51 self.assertAlmostEqual(results.neutron_inc_xs, 0.145427, 5) -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
rc02721c4 r6edd344 205 205 model_index = self.widget.cbModel.findText("be_polyelectrolyte") 206 206 self.widget.cbModel.setCurrentIndex(model_index) 207 QtWidgets.qApp.processEvents() 207 208 208 209 # check the enablement of controls … … 1229 1230 model_index = self.widget.cbModel.findText("pringle") 1230 1231 self.widget.cbModel.setCurrentIndex(model_index) 1232 QtWidgets.qApp.processEvents() 1231 1233 1232 1234 # make sure the parameters are different than before -
src/sas/qtgui/Plotting/Plotter.py
rb016f17 r6edd344 220 220 Resize the legend window/font on canvas resize 221 221 """ 222 if not self.showLegend: 223 return 222 224 width = _legendResize(event.width) 223 225 # resize the legend to follow the canvas width. -
src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py
r0989bad r6edd344 409 409 410 410 # Replace data in plot 411 self.plotter.replacePlot( 1, data2)411 self.plotter.replacePlot("Test name", data2) 412 412 413 413 # See that the labels changed
Note: See TracChangeset
for help on using the changeset viewer.