Changeset 144fe21 in sasview for src/sas/qtgui/Plotting/UnitTesting


Ignore:
Timestamp:
Jul 26, 2018 3:30:15 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
dc71408
Parents:
e793f62
git-author:
Piotr Rozyczko <rozyczko@…> (07/26/18 03:28:51)
git-committer:
Piotr Rozyczko <rozyczko@…> (07/26/18 03:30:15)
Message:

new unit test runner script + test fixes. SASVIEW-970

Location:
src/sas/qtgui/Plotting/UnitTesting
Files:
3 edited

Legend:

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

    r53c771e r144fe21  
    148148        self.assertEqual(len(actions), 7) 
    149149 
    150         # Trigger Save Image and make sure the method is called 
    151         self.assertEqual(actions[0].text(), "Save Image") 
    152         self.plotter.toolbar.save_figure = MagicMock() 
    153         actions[0].trigger() 
    154         self.assertTrue(self.plotter.toolbar.save_figure.called) 
    155  
    156150        # Trigger Print Image and make sure the method is called 
    157151        self.assertEqual(actions[1].text(), "Print Image") 
  • src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py

    rdd150ef r144fe21  
    4747        self.assertIsInstance(self.plotter, QtWidgets.QWidget) 
    4848        self.assertIsInstance(self.plotter.canvas, FigureCanvas) 
    49         self.assertIsInstance(self.plotter.toolbar, NavigationToolbar) 
    5049        self.assertIsInstance(self.plotter.properties, ScaleProperties) 
    5150 
     
    8483        self.plotter.closeEvent(None) 
    8584        self.assertTrue(PlotHelper.deletePlot.called) 
    86  
    87     def testOnImageSave(self): 
    88         ''' test the workspace save ''' 
    89         self.plotter.toolbar.save_figure = MagicMock() 
    90         self.plotter.onImageSave() 
    91         self.assertTrue(self.plotter.toolbar.save_figure.called) 
    9285 
    9386    def testOnImagePrint(self): 
     
    132125        actions = self.plotter.contextMenu.actions() 
    133126        self.assertEqual(len(actions), 4) 
    134  
    135         # Trigger Save Image and make sure the method is called 
    136         self.assertEqual(actions[0].text(), "Save Image") 
    137         self.plotter.toolbar.save_figure = MagicMock() 
    138         actions[0].trigger() 
    139         self.assertTrue(self.plotter.toolbar.save_figure.called) 
    140127 
    141128        # Trigger Print Image and make sure the method is called 
  • src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py

    r63319b0 r144fe21  
    104104        actions = self.plotter.contextMenu.actions() 
    105105        self.assertEqual(len(actions), 7) 
    106  
    107         # Trigger Save Image and make sure the method is called 
    108         self.assertEqual(actions[0].text(), "Save Image") 
    109         self.plotter.toolbar.save_figure = MagicMock() 
    110         actions[0].trigger() 
    111         self.assertTrue(self.plotter.toolbar.save_figure.called) 
    112106 
    113107        # Trigger Print Image and make sure the method is called 
Note: See TracChangeset for help on using the changeset viewer.