Changeset f53d684 in sasview for test/fileconverter


Ignore:
Timestamp:
Dec 5, 2017 12:31:07 PM (7 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/fileconverter/test/utest_nxcansas_writer.py

    rc16ffe7 rf53d684  
    33 
    44import os 
     5import os.path 
    56import unittest 
    67import warnings 
    78 
    89warnings.simplefilter("ignore") 
     10 
     11 
     12def find(filename): 
     13    return os.path.join(os.path.dirname(__file__), filename) 
     14 
    915 
    1016class nxcansas_writer(unittest.TestCase): 
     
    1319        self.loader = Loader() 
    1420        self.writer = NXcanSASWriter() 
    15         self.read_file_1d = "cansas1d.xml" 
    16         self.write_file_1d = "export1d.h5" 
    17         self.read_file_2d = "exp18_14_igor_2dqxqy.dat" 
    18         self.write_file_2d = "export2d.h5" 
     21        self.read_file_1d = find("cansas1d.xml") 
     22        self.write_file_1d = find("export1d.h5") 
     23        self.read_file_2d = find("exp18_14_igor_2dqxqy.dat") 
     24        self.write_file_2d = find("export2d.h5") 
    1925 
    2026        self.data_1d = self.loader.load(self.read_file_1d)[0] 
Note: See TracChangeset for help on using the changeset viewer.