Changeset 2797 for trunk/test


Ignore:
Timestamp:
03/18/13 11:26:14 (12 years ago)
Author:
Malte Marquarding
Message:

use relative path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/test_scantable.py

    r2791 r2797  
    44import datetime
    55from nose.tools import *
     6import asap
    67from asap import scantable, selector, mask_not
    78from asap.logging import asaplog
     
    910asaplog.disable()
    1011
     12def test_version():
     13    assert_equal(asap.__version__, "4.1.2")
     14
    1115def tempdir_setup():
    1216    os.makedirs("test_temp")
     
    1721class TestScantable(object):
    1822    def setup(self):
    19         s = scantable("data/MOPS.rpf", average=True)
     23        pth = os.path.dirname(__file__)
     24        s = scantable(os.path.join(pth, "data", "MOPS.rpf"), average=True)
    2025        sel = selector()
    2126        # make sure this order is always correct - in can be random
     
    2732
    2833    def test_init(self):
    29         st = scantable("data/MOPS.rpf", average=False)
     34        fname = os.path.join(os.path.dirname(__file__), "data", "MOPS.rpf")
     35        st = scantable(fname, average=False)
    3036        assert_equal(st.ncycle(), 32)
    31         st = scantable("data/MOPS.rpf", average=True)
     37        st = scantable(fname, average=True)
    3238        assert_equal(st.ncycle(), 2)
    33         st = scantable("data/MOPS.rpf", unit="Jy")
     39        st = scantable(fname, unit="Jy")
    3440        assert_equal(st.get_fluxunit(), "Jy")
    35         st = scantable("data/MOPS.rpf", unit="K")
     41        st = scantable(fname, unit="K")
    3642        assert_equal(st.get_fluxunit(), "K")
    37         assert_raises(RuntimeError, scantable, "data/MOPS.rpf", unit="junk")
    38         st = scantable(["data/MOPS.rpf","data/MOPS.rpf"], average=False)
     43        assert_raises(RuntimeError, scantable, fname, unit="junk")
     44        st = scantable([fname,fname], average=False)
    3945        assert_equal(st.nscan(), 4)
    4046
Note: See TracChangeset for help on using the changeset viewer.