Changeset 99ea1b0 in sasview for src/sas/qtgui/Plotting/UnitTesting/LinearFitTest.py
- Timestamp:
- Oct 27, 2017 8:49:35 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:
- 0849aec
- Parents:
- 895e7359
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/UnitTesting/LinearFitTest.py
r464cd07 r99ea1b0 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)
Note: See TracChangeset
for help on using the changeset viewer.