Ignore:
Timestamp:
Oct 27, 2017 8: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/LinearFitTest.py

    r464cd07 r99ea1b0  
    44 
    55from PyQt4 import QtGui 
    6 from mock import MagicMock 
     6from unittest.mock import MagicMock 
    77 
    88# set up import paths 
     
    5959        return_values = self.widget.parent.emit.call_args[0][1] 
    6060        # Compare 
    61         self.assertItemsEqual(return_values[0], [1.0, 3.0]) 
     61        self.assertCountEqual(return_values[0], [1.0, 3.0]) 
    6262        self.assertAlmostEqual(return_values[1][0], 10.004054329, 6) 
    6363        self.assertAlmostEqual(return_values[1][1], 12.030439848, 6) 
     
    6868        return_values = self.widget.parent.emit.call_args[0][1] 
    6969        # Compare 
    70         self.assertItemsEqual(return_values[0], [1.0, 3.0]) 
     70        self.assertCountEqual(return_values[0], [1.0, 3.0]) 
    7171        self.assertAlmostEqual(return_values[1][0], 9.987732937, 6) 
    7272        self.assertAlmostEqual(return_values[1][1], 11.84365082, 6) 
     
    8181        x, y, dy = self.widget.origData() 
    8282 
    83         self.assertItemsEqual(x, orig_x) 
     83        self.assertCountEqual(x, orig_x) 
    8484        self.assertEqual(y[0], orig_y[0]) 
    8585        self.assertAlmostEqual(y[1], orig_y[1], 8) 
     
    9898        x, y, dy = self.widget.origData() 
    9999 
    100         self.assertItemsEqual(x, orig_x) 
    101         self.assertItemsEqual(y, orig_y) 
    102         self.assertItemsEqual(dy, orig_dy) 
     100        self.assertCountEqual(x, orig_x) 
     101        self.assertCountEqual(y, orig_y) 
     102        self.assertCountEqual(dy, orig_dy) 
    103103 
    104104        # x, log(y) 
     
    111111        x, y, dy = self.widget.origData() 
    112112 
    113         self.assertItemsEqual(x, orig_x) 
     113        self.assertCountEqual(x, orig_x) 
    114114        self.assertEqual(y[0], orig_y[0]) 
    115115        self.assertAlmostEqual(y[1], orig_y[1], 8) 
Note: See TracChangeset for help on using the changeset viewer.