Ignore:
Timestamp:
Dec 4, 2018 6:45:07 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
Children:
44a698c
Parents:
99f8760
Message:

Modified the main window name from MainWindow? to more suitable SasView?.
Fixed a bunch of related and unrelated unit tests.

File:
1 edited

Legend:

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

    r34f13a83 r0989bad  
    5757        self.plotter.data = self.data 
    5858        self.plotter.show() 
    59         FigureCanvas.draw = MagicMock() 
     59        FigureCanvas.draw_idle = MagicMock() 
    6060 
    6161        self.plotter.plot(hide_error=False) 
    6262 
    6363        self.assertEqual(self.plotter.ax.get_xscale(), 'log') 
    64         self.assertTrue(FigureCanvas.draw.called) 
     64        self.assertTrue(FigureCanvas.draw_idle.called) 
    6565 
    6666        self.plotter.figure.clf() 
     
    7070        self.plotter.data = self.data 
    7171        self.plotter.show() 
    72         FigureCanvas.draw = MagicMock() 
     72        FigureCanvas.draw_idle = MagicMock() 
    7373 
    7474        self.plotter.plot(hide_error=True) 
    7575 
    7676        self.assertEqual(self.plotter.ax.get_yscale(), 'log') 
    77         self.assertTrue(FigureCanvas.draw.called) 
     77        self.assertTrue(FigureCanvas.draw_idle.called) 
    7878        self.plotter.figure.clf() 
    7979 
     
    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): 
Note: See TracChangeset for help on using the changeset viewer.