casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
leo2pt_test.py
Go to the documentation of this file.
00001 ########################################################################
00002 #       This script will call the main regression script               #
00003 #       leo2pt_regression.py. The returned data set from it            #
00004 #       is copied by the runTest() method to the working               #
00005 #       directory, defaulted to /tmp.                                  #
00006 #       Exceptions will be handled if the script fails to run or if    #
00007 #       the regression tests do not pass.                              #
00008 #                                                                      #
00009 ########################################################################
00010 
00011 import sys
00012 import os
00013 import string
00014 from locatescript import locatescript
00015 import inspect
00016 
00017 a=inspect.stack()
00018 stacklevel=0
00019 for k in range(len(a)):
00020     if (string.find(a[k][1], 'ipython console') > 0):
00021         stacklevel=k
00022         break
00023 gl=sys._getframe(stacklevel).f_globals
00024 
00025 def description():
00026     return "Script for LeoRing EVLA 20cm Data"
00027 
00028 def run():
00029     lepath=locatescript('leo2pt_regression.py')
00030     gl['regstate']=True
00031     execfile(lepath, gl)
00032     print 'regstate =', gl['regstate']
00033     if not gl['regstate']:
00034         raise Exception, 'regstate = False'
00035 
00036     return []
00037 
00038 def data():
00039     ### return the data files that are needed by the regression script
00040     return ['leo2pt.55183.452640752315']
00041 
00042 def doCopy():
00043     return [0]
00044