Ignore:
Timestamp:
Aug 2, 2017 3:37:27 AM (7 years ago)
Author:
lewis
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:
3eb7bf2
Parents:
be43448
Message:

Remove unit test reliance on IgorReader?

File:
1 edited

Legend:

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

    r5a8cdbb r2a52b0e  
    103103    def setUp(self): 
    104104        filepath = os.path.join(os.path.dirname( 
    105             os.path.realpath(__file__)), 'MAR07232_rest.ASC') 
    106         self.data = Loader().load(filepath) 
     105            os.path.realpath(__file__)), 'MAR07232_rest.h5') 
     106        self.data = Loader().load(filepath)[0] 
    107107 
    108108    def test_ring(self): 
     
    119119        filepath = os.path.join(os.path.dirname( 
    120120            os.path.realpath(__file__)), 'ring_testdata.txt') 
    121         answer = Loader().load(filepath) 
     121        answer = Loader().load(filepath)[0] 
    122122 
    123123        for i in range(r.nbins_phi - 1): 
     
    139139        filepath = os.path.join(os.path.dirname( 
    140140            os.path.realpath(__file__)), 'avg_testdata.txt') 
    141         answer = Loader().load(filepath) 
     141        answer = Loader().load(filepath)[0] 
    142142        for i in range(r.nbins_phi): 
    143143            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    175175        filepath = os.path.join(os.path.dirname( 
    176176            os.path.realpath(__file__)), 'slabx_testdata.txt') 
    177         answer = Loader().load(filepath) 
     177        answer = Loader().load(filepath)[0] 
    178178        for i in range(len(o.x)): 
    179179            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    194194        filepath = os.path.join(os.path.dirname( 
    195195            os.path.realpath(__file__)), 'slaby_testdata.txt') 
    196         answer = Loader().load(filepath) 
     196        answer = Loader().load(filepath)[0] 
    197197        for i in range(len(o.x)): 
    198198            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    221221        filepath = os.path.join(os.path.dirname( 
    222222            os.path.realpath(__file__)), 'ring_testdata.txt') 
    223         answer = Loader().load(filepath) 
     223        answer = Loader().load(filepath)[0] 
    224224        for i in range(len(o.x)): 
    225225            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    239239        filepath = os.path.join(os.path.dirname( 
    240240            os.path.realpath(__file__)), 'sectorphi_testdata.txt') 
    241         answer = Loader().load(filepath) 
     241        answer = Loader().load(filepath)[0] 
    242242        for i in range(len(o.x)): 
    243243            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    257257        filepath = os.path.join(os.path.dirname( 
    258258            os.path.realpath(__file__)), 'sectorq_testdata.txt') 
    259         answer = Loader().load(filepath) 
     259        answer = Loader().load(filepath)[0] 
    260260        for i in range(len(o.x)): 
    261261            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
Note: See TracChangeset for help on using the changeset viewer.