Changeset 7fb471d in sasview for src/sas/qtgui/Plotting
- Timestamp:
- Nov 9, 2017 8:41:56 AM (7 years ago)
- 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 08:49:35)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:56)
- Location:
- src/sas/qtgui/Plotting/UnitTesting
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/UnitTesting/AddTextTest.py
r464cd07 r7fb471d 1 1 import sys 2 2 import unittest 3 from mock import MagicMock3 from unittest.mock import MagicMock 4 4 5 5 from PyQt4 import QtGui -
src/sas/qtgui/Plotting/UnitTesting/BoxSumTest.py
rcee5c78 r7fb471d 1 1 import sys 2 2 import unittest 3 from mock import MagicMock3 from unittest.mock import MagicMock 4 4 5 5 from PyQt4 import QtGui -
src/sas/qtgui/Plotting/UnitTesting/ColorMapTest.py
r464cd07 r7fb471d 4 4 5 5 from PyQt4 import QtGui 6 from mock import MagicMock6 from unittest.mock import MagicMock 7 7 import matplotlib as mpl 8 8 -
src/sas/qtgui/Plotting/UnitTesting/LinearFitTest.py
r464cd07 r7fb471d 4 4 5 5 from PyQt4 import QtGui 6 from mock import MagicMock6 from unittest.mock import MagicMock 7 7 8 8 # set up import paths … … 59 59 return_values = self.widget.parent.emit.call_args[0][1] 60 60 # Compare 61 self.assert ItemsEqual(return_values[0], [1.0, 3.0])61 self.assertCountEqual(return_values[0], [1.0, 3.0]) 62 62 self.assertAlmostEqual(return_values[1][0], 10.004054329, 6) 63 63 self.assertAlmostEqual(return_values[1][1], 12.030439848, 6) … … 68 68 return_values = self.widget.parent.emit.call_args[0][1] 69 69 # Compare 70 self.assert ItemsEqual(return_values[0], [1.0, 3.0])70 self.assertCountEqual(return_values[0], [1.0, 3.0]) 71 71 self.assertAlmostEqual(return_values[1][0], 9.987732937, 6) 72 72 self.assertAlmostEqual(return_values[1][1], 11.84365082, 6) … … 81 81 x, y, dy = self.widget.origData() 82 82 83 self.assert ItemsEqual(x, orig_x)83 self.assertCountEqual(x, orig_x) 84 84 self.assertEqual(y[0], orig_y[0]) 85 85 self.assertAlmostEqual(y[1], orig_y[1], 8) … … 98 98 x, y, dy = self.widget.origData() 99 99 100 self.assert ItemsEqual(x, orig_x)101 self.assert ItemsEqual(y, orig_y)102 self.assert ItemsEqual(dy, orig_dy)100 self.assertCountEqual(x, orig_x) 101 self.assertCountEqual(y, orig_y) 102 self.assertCountEqual(dy, orig_dy) 103 103 104 104 # x, log(y) … … 111 111 x, y, dy = self.widget.origData() 112 112 113 self.assert ItemsEqual(x, orig_x)113 self.assertCountEqual(x, orig_x) 114 114 self.assertEqual(y[0], orig_y[0]) 115 115 self.assertAlmostEqual(y[1], orig_y[1], 8) -
src/sas/qtgui/Plotting/UnitTesting/PlotPropertiesTest.py
r464cd07 r7fb471d 1 1 import sys 2 2 import unittest 3 from mock import MagicMock3 from unittest.mock import MagicMock 4 4 5 5 from PyQt4 import QtGui -
src/sas/qtgui/Plotting/UnitTesting/Plotter2DTest.py
rb2a5042 r7fb471d 7 7 from PyQt4 import QtCore 8 8 from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas 9 from mock import MagicMock9 from unittest.mock import MagicMock 10 10 from mpl_toolkits.mplot3d import Axes3D 11 11 -
src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py
rb2a5042 r7fb471d 2 2 import unittest 3 3 import platform 4 from mock import patch,MagicMock4 from unittest.mock import MagicMock 5 5 6 6 from PyQt4 import QtGui -
src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py
- Property mode changed from 100644 to 100755
r749b715 r7fb471d 6 6 from PyQt4 import QtCore 7 7 from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas 8 from mock import MagicMock9 from mock import patch8 from unittest.mock import MagicMock 9 from unittest.mock import patch 10 10 11 11 ####### TEMP … … 257 257 258 258 # 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) 260 260 self.plotter.onLinearFit(1) 261 261 … … 281 281 282 282 # 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) 284 284 285 285 # Delete one set 286 286 self.plotter.onRemovePlot(2) 287 287 # 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) 289 289 290 290 self.plotter.manager = MagicMock() … … 293 293 self.plotter.onRemovePlot(1) 294 294 # 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) 296 296 # Assure the plotter window is closed 297 297 self.assertFalse(self.plotter.isVisible()) -
src/sas/qtgui/Plotting/UnitTesting/SlicerModelTest.py
r464cd07 r7fb471d 1 1 import sys 2 2 import unittest 3 from mock import MagicMock3 from unittest.mock import MagicMock 4 4 5 5 from PyQt4 import QtGui -
src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py
r464cd07 r7fb471d 1 1 import sys 2 2 import unittest 3 from mock import MagicMock3 from unittest.mock import MagicMock 4 4 5 5 from PyQt4 import QtGui … … 7 7 from PyQt4 import QtTest 8 8 from PyQt4 import QtWebKit 9 10 from mock import MagicMock11 9 12 10 # set up import paths
Note: See TracChangeset
for help on using the changeset viewer.