Changeset 4fb10e5 in sasview


Ignore:
Timestamp:
Apr 5, 2017 1:14:41 PM (8 years ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
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:
00a6ec4
Parents:
3608cd1
Message:

Added absolute paths to the files

File:
1 edited

Legend:

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

    r9a5097c r4fb10e5  
    22import unittest 
    33import math 
     4import os 
    45 
    56from sas.sascalc.dataloader.loader import  Loader 
     
    9798     
    9899    def setUp(self): 
    99         self.data = Loader().load('MAR07232_rest.ASC') 
     100        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MAR07232_rest.ASC') 
     101        self.data = Loader().load(filepath) 
    100102         
    101103    def test_ring(self): 
     
    110112         
    111113        o = r(self.data) 
    112         answer = Loader().load('ring_testdata.txt') 
     114        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ring_testdata.txt') 
     115        answer = Loader().load(filepath) 
    113116         
    114117        for i in range(r.nbins_phi - 1): 
     
    128131        o = r(self.data) 
    129132 
    130         answer = Loader().load('avg_testdata.txt') 
     133        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'avg_testdata.txt') 
     134        answer = Loader().load(filepath) 
    131135        for i in range(r.nbins_phi): 
    132136            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    163167        o = r(self.data) 
    164168 
    165         answer = Loader().load('slabx_testdata.txt') 
     169        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'slabx_testdata.txt') 
     170        answer = Loader().load(filepath) 
    166171        for i in range(len(o.x)): 
    167172            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    180185        o = r(self.data) 
    181186 
    182         answer = Loader().load('slaby_testdata.txt') 
     187        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'slaby_testdata.txt') 
     188        answer = Loader().load(filepath) 
    183189        for i in range(len(o.x)): 
    184190            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    207213        o = r(self.data) 
    208214 
    209         answer = Loader().load('ring_testdata.txt') 
     215        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ring_testdata.txt') 
     216        answer = Loader().load(filepath) 
    210217        for i in range(len(o.x)): 
    211218            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    225232        o = r(self.data) 
    226233 
    227         answer = Loader().load('sectorphi_testdata.txt') 
     234        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sectorphi_testdata.txt') 
     235        answer = Loader().load(filepath) 
    228236        for i in range(len(o.x)): 
    229237            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    243251        o = r(self.data) 
    244252 
    245         answer = Loader().load('sectorq_testdata.txt') 
     253        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sectorq_testdata.txt') 
     254        answer = Loader().load(filepath) 
    246255        for i in range(len(o.x)): 
    247256            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
Note: See TracChangeset for help on using the changeset viewer.