Changeset 63319b0 in sasview for src/sas/qtgui/Plotting


Ignore:
Timestamp:
Jan 29, 2018 9:33:58 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
da9a0722
Parents:
9c0ce68
Message:

unit tests for constraints: FittingWidget?, FittingPerspective?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py

    • Property mode changed from 100755 to 100644
    r53c771e r63319b0  
    5050        self.assertEqual(self.plotter.data, self.data) 
    5151        self.assertEqual(self.plotter._title, self.data.name) 
    52         self.assertEqual(self.plotter.xLabel, "$()$") 
    53         self.assertEqual(self.plotter.yLabel, "$()$") 
     52        self.assertEqual(self.plotter.xLabel, "") 
     53        self.assertEqual(self.plotter.yLabel, "") 
    5454 
    5555    def testPlotWithErrors(self): 
     
    9191        self.plotter.data = data 
    9292        self.plotter.show() 
    93         FigureCanvas.draw = MagicMock() 
     93        FigureCanvas.draw_idle = MagicMock() 
    9494 
    9595        self.plotter.plot(hide_error=True) 
     
    9797        self.assertEqual(self.plotter.ax.get_xscale(), 'linear') 
    9898        self.assertEqual(self.plotter.ax.get_yscale(), 'linear') 
    99         self.assertTrue(FigureCanvas.draw.called) 
     99        self.assertTrue(FigureCanvas.draw_idle.called) 
    100100 
    101101    def testCreateContextMenuQuick(self): 
     
    200200        self.plotter.addText.exec_ = MagicMock(return_value = QtWidgets.QDialog.Accepted) 
    201201        # Add text to graph 
     202        self.plotter.x_click = 1.0 
     203        self.plotter.y_click = 5.0 
    202204        self.plotter.onAddText() 
    203205        self.plotter.show() 
     
    394396        xl = self.plotter.ax.xaxis.label.get_text() 
    395397        yl = self.plotter.ax.yaxis.label.get_text() 
    396         self.assertEqual(xl, "$()$") 
    397         self.assertEqual(yl, "$()$") 
     398        self.assertEqual(xl, "") 
     399        self.assertEqual(yl, "") 
    398400 
    399401        # Prepare new data 
Note: See TracChangeset for help on using the changeset viewer.