from __future__ import absolute_import
from __future__ import print_function
from casatasks.private.casa_transition import is_CASA6
from casatools import ctsys
from casatasks import bandpass
from __main__ import default
from tasks import bandpass
from casatestutils import testhelper as th
''' Python unit tests for the bandpass task
These tests will only verify if the bandpass calibration
tables created for an MS and an MMS agree. These are
not full unit tests for the bandpass task.
datapath = ctsys.resolve('unittest/bandpass/')
datapath = os.environ.get('CASAPATH').split()[0] +\
'/casatestdata/unittest/bandpass/'
if 'TEST_DATADIR' in os.environ:
DATADIR = str(os.environ.get('TEST_DATADIR'))+'/bandpass/'
if os.path.isdir(DATADIR):
print('WARN: directory '+DATADIR+' does not exist')
print('bandpass tests will use data from '+datapath)
class test_base(unittest.TestCase):
shutil.rmtree(self.msfile, ignore_errors=True)
os.system('rm -rf '+self.msfile+'.bcal')
self.msfile = prefix + '.ms'