Commits

Ville Suoranta authored 1c672909f99 Merge
Merge pull request #1091 in CASA/casa from CAS-12640 to master

* commit 'c044d2d4ce498cd78066363f0ba59095306497d5': Merge the CAS-12624 CASA6 fix to CASA5
No tags

gcwrap/python/scripts/tests/test_predictcomp.py

Modified
80 80 def test_invalid_freqrange(self):
81 81 '''predictcomp: invalid freqrange'''
82 82 if is_CASA6:
83 83 # casatasks throw exceptions
84 84 self.assertRaises(Exception, predictcomp, objname='Titan', epoch='2017/09/01/00:00', minfreq='100', maxfreq='120' )
85 85 else:
86 86 # CASA 5 tasks do not
87 87 self.res=predictcomp(objname='Titan', epoch='2017/09/01/00:00', minfreq='100',maxfreq='120')
88 88 self.assertIsNone(self.res)
89 89
90 + def test_badmaxfreq(self):
91 + '''predictcomp: invalid maxfreq '''
92 + # ignore the maxfreq just calculate for minfreq
93 + self.res=predictcomp(objname='Titan', epoch='2017/09/01/00:00', minfreq='100GHz', maxfreq='120BadUnit', standard='Butler-JPL-Horizons 2012')
94 + self.assertTrue(type(self.res)==dict)
95 + self.assertTrue(os.path.exists(self.res['clist']))
96 +
90 97 @unittest.skipIf(is_CASA6,"no plotting in casatasks")
91 98 def test_predicted_visplot(self):
92 99 '''predictcomp: generate visibility plot for a given array configuration'''
93 100 self.res=predictcomp( objname='Titan', epoch='2017/09/01/00:00', minfreq='100GHz',
94 101 maxfreq='120GHz', standard='Butler-JPL-Horizons 2012',
95 102 antennalist=ctsys_resolve(os.path.join(datapath,'alma.cycle5.1.cfg')),
96 103 showplot=False,savefig='visplot.png' )
97 104 print("self.res : %s" % self.res)
98 105 print("type : %s" % type(self.res))
99 106 self.assertTrue(type(self.res)==dict)

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut