Ignore:
Timestamp:
Dec 5, 2017 12:31:07 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5bb05a4
Parents:
3053a4a
git-author:
Stuart Prescott <llimeht@…> (12/05/17 12:31:07)
git-committer:
Paul Kienzle <pkienzle@…> (12/05/17 12:31:07)
Message:

Make tests work from any directory and functional without special runner script (#124)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/sasinvariant/test/utest_use_cases.py

    rb09095a rf53d684  
    44""" 
    55#TODO: there's no test for smeared extrapolation 
     6 
     7import os.path 
    68import unittest 
    79from sas.sascalc.dataloader.loader import  Loader 
     
    911 
    1012 
     13def find(filename): 
     14    return os.path.join(os.path.dirname(__file__), filename) 
     15 
     16 
    1117class Data1D: 
    1218    pass 
     
    1824    """ 
    1925    def setUp(self): 
    20         self.data_list = Loader().load("linefittest.txt") 
     26        self.data_list = Loader().load(find("linefittest.txt")) 
    2127        self.data = self.data_list[0] 
    2228 
     
    5763    """ 
    5864    def setUp(self): 
    59         self.data_list = Loader().load("linefittest_no_weight.txt") 
     65        self.data_list = Loader().load(find("linefittest_no_weight.txt")) 
    6066        self.data = self.data_list[0] 
    6167 
     
    96102    """ 
    97103    def setUp(self): 
    98         self.data_list = Loader().load("PolySpheres.txt") 
     104        self.data_list = Loader().load(find("PolySpheres.txt")) 
    99105        self.data = self.data_list[0] 
    100106 
     
    278284    def setUp(self): 
    279285        # data with smear info 
    280         list = Loader().load("latex_smeared.xml") 
     286        list = Loader().load(find("latex_smeared.xml")) 
    281287        self.data_q_smear = list[0] 
    282288 
Note: See TracChangeset for help on using the changeset viewer.