Ignore:
Timestamp:
Nov 9, 2017 6:41:56 AM (6 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:
4992ff2
Parents:
cee5c78
git-author:
Piotr Rozyczko <rozyczko@…> (10/27/17 06:49:35)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 06:41:56)
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
    r749b715 r7fb471d  
    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 
     
    257257 
    258258        # Just this one plot 
    259         self.assertEqual(len(self.plotter.plot_dict.keys()), 1) 
     259        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 1) 
    260260        self.plotter.onLinearFit(1) 
    261261 
     
    281281 
    282282        # Assure we have two sets 
    283         self.assertEqual(len(self.plotter.plot_dict.keys()), 2) 
     283        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 2) 
    284284 
    285285        # Delete one set 
    286286        self.plotter.onRemovePlot(2) 
    287287        # Assure we have two sets 
    288         self.assertEqual(len(self.plotter.plot_dict.keys()), 1) 
     288        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 1) 
    289289 
    290290        self.plotter.manager = MagicMock() 
     
    293293        self.plotter.onRemovePlot(1) 
    294294        # Assure we have no plots 
    295         self.assertEqual(len(self.plotter.plot_dict.keys()), 0) 
     295        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 0) 
    296296        # Assure the plotter window is closed 
    297297        self.assertFalse(self.plotter.isVisible()) 
Note: See TracChangeset for help on using the changeset viewer.