Changeset a78a02f in sasview for test/sasdataloader


Ignore:
Timestamp:
Sep 7, 2017 2:04:43 PM (7 years ago)
Author:
krzywon
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7582df3
Parents:
b54440d
Message:

Make suggested changes for unit test fixes.

Location:
test/sasdataloader/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • test/sasdataloader/test/utest_abs_reader.py

    r17e257b5 ra78a02f  
    4848        self.assertEqual(self.data.detector[0].beam_center.y, center_y) 
    4949 
    50         self.assertEqual(self.data.y_unit, '1/cm') 
     50        self.assertEqual(self.data.y_unit, 'cm^{-1}') 
    5151        self.assertEqual(self.data.x[0], 0.002618) 
    5252        self.assertEqual(self.data.x[1], 0.007854) 
     
    146146        # Data 
    147147        self.assertEqual(len(self.data.x), 2) 
    148         self.assertEqual(self.data.x_unit, '1/A') 
    149         self.assertEqual(self.data.y_unit, '1/cm') 
     148        self.assertEqual(self.data.x_unit, 'A^{-1}') 
     149        self.assertEqual(self.data.y_unit, 'cm^{-1}') 
    150150        self.assertAlmostEqual(self.data.x[0], 0.02, 6) 
    151151        self.assertAlmostEqual(self.data.y[0], 1000, 6) 
     
    324324        # Data 
    325325        self.assertEqual(len(self.data.x), 2) 
    326         self.assertEqual(self.data.x_unit, '1/A') 
    327         self.assertEqual(self.data.y_unit, '1/cm') 
     326        self.assertEqual(self.data.x_unit, 'A^{-1}') 
     327        self.assertEqual(self.data.y_unit, 'cm^{-1}') 
    328328        self.assertEqual(self.data.x[0], 0.02) 
    329329        self.assertEqual(self.data.y[0], 1000) 
  • test/sasdataloader/test/utest_ascii.py

    r17e257b5 ra78a02f  
    3232        self.assertEqual(self.f1.x[0],0.002618) 
    3333        self.assertEqual(self.f1.x[9],0.0497) 
    34         self.assertTrue(self.f1.x_unit == '1/A' or self.f1.x_unit == 'A^{-1}') 
    35         self.assertTrue(self.f1.y_unit == '1/cm' or self.f1.y_unit == 'cm^{-1}') 
     34        self.assertTrue(self.f1.x_unit == 'A^{-1}') 
     35        self.assertTrue(self.f1.y_unit == 'cm^{-1}') 
    3636         
    3737        self.assertEqual(self.f1.meta_data['loader'],"ASCII") 
  • test/sasdataloader/test/utest_sesans.py

    r17e257b5 ra78a02f  
    6565            "sesans_examples/no_spin_echo_unit.ses") 
    6666 
    67     def test_sesans_no_version(self): 
    68         """ 
    69             Confirm that sesans files with no file format version raise an appropriate error 
    70         """ 
    71         # Warning message sent to logger for files not found. 
    72         pass 
    73  
    7467    def test_sesans_future_version(self): 
    7568        """ 
Note: See TracChangeset for help on using the changeset viewer.