from __main__ import default
datapath = os.environ.get('CASAPATH').split()[0] + "/casatestdata//unittest/plotcal/"
if os.environ.has_key('TEST_DATADIR'):
DATADIR = str(os.environ.get('TEST_DATADIR'))
if os.path.isdir(DATADIR):
print 'WARN: directory '+DATADIR+' does not exist'
print 'plotcal tests will use data from '+datapath
class plotcal_test_base(unittest.TestCase):
Btable = 'ngc5921.ref1a.bcal'
Gtable = "ngc5921.ref1a.gcal"
Ttable = "wvrgcalctest.W"
fig = "/tmp/testplotcal.png"
if (os.path.exists(self.Btable)):
shutil.rmtree(self.Btable)
shutil.copytree(datapath+self.Btable, self.Btable)
if (os.path.exists(self.Gtable)):
shutil.rmtree(self.Gtable)
shutil.copytree(datapath+self.Gtable, self.Gtable)
if (os.path.exists(self.Ttable)):
shutil.rmtree(self.Ttable)
shutil.copytree(datapath+self.Ttable, self.Ttable)
def setUpTSYStable(self):
if (os.path.exists(self.TSYStable)):
shutil.rmtree(self.TSYStable)
shutil.copytree(datapath+self.TSYStable, self.TSYStable)
if (os.path.exists(self.Bms)):