Ignore:
Timestamp:
Oct 27, 2017 6:49:35 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:
0849aec
Parents:
895e7359
Message:

Update for unit tests and minor functionality quirks

File:
1 edited

Legend:

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

    • Property mode changed from 100644 to 100755
    rb2a5042 r99ea1b0  
    66from PyQt4 import QtCore 
    77from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas 
    8 from mock import MagicMock 
    9 from mock import patch 
     8from unittest.mock import MagicMock 
     9from unittest.mock import patch 
    1010 
    1111####### TEMP 
     
    236236 
    237237        # Just this one plot 
    238         self.assertEqual(len(self.plotter.plot_dict.keys()), 1) 
     238        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 1) 
    239239        self.plotter.onLinearFit(1) 
    240240 
     
    260260 
    261261        # Assure we have two sets 
    262         self.assertEqual(len(self.plotter.plot_dict.keys()), 2) 
     262        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 2) 
    263263 
    264264        # Delete one set 
    265265        self.plotter.onRemovePlot(2) 
    266266        # Assure we have two sets 
    267         self.assertEqual(len(self.plotter.plot_dict.keys()), 1) 
     267        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 1) 
    268268 
    269269        self.plotter.manager = MagicMock() 
     
    272272        self.plotter.onRemovePlot(1) 
    273273        # Assure we have no plots 
    274         self.assertEqual(len(self.plotter.plot_dict.keys()), 0) 
     274        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 0) 
    275275        # Assure the plotter window is closed 
    276276        self.assertFalse(self.plotter.isVisible()) 
Note: See TracChangeset for help on using the changeset viewer.