self.res=predictcomp(objname='Titan', epoch='2017/09/01/00:00', minfreq='100GHz', maxfreq='120BadUnit', standard='Butler-JPL-Horizons 2012')
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 predictcomp, casalog
ctsys_resolve = ctsys.resolve
from __main__ import default
from tasks import predictcomp
dataRoot = os.path.join(os.environ.get('CASAPATH').split()[0],'data')
def ctsys_resolve(apath):
return os.path.join(dataRoot,apath)
''' Python unit tests for the predictcomp task
- tests the following parameters:
objname: error for unsupported object vs supported object
standard: wrong standard vs correct standard
minfreq/maxfreq: wrong unit vs correct unit
output: check for the cl file
antennalist: use of the configuration file to plot 'observed' visibility
amplitudes vs uvdist. GUI is turned off.
class predictcomp_test(unittest.TestCase):
'''predictcomp: test defaults'''
self.assertRaises(Exception,predictcomp)
self.assertIsNone(self.res)
def test_invalid_objname(self):
'''predictcomp: invalid objname'''