Commits

Sandra Castro authored d12391faf8c Merge
Merge pull request #411 in CASA/casa6 from CAS-13458 to master

* commit '658b2d52e6577f756523465b714569cab7ca04da': CAS-13458 don't delete .png files in tearDown method

casatests/stakeholder/test_stk_vlass_pipeline_imaging.py

Modified
178 178 #################################################################
179 179
180 180 # create baseclass and different setups for each dataset
181 181
182 182 ## Base Test class with Utility functions
183 183 class test_base(unittest.TestCase):
184 184
185 185 # Separate functions here, for special-case tests that need their own MS.
186 186 def prepData(self,msname=""):
187 187 self.dataset1 = 'vlass1.1_rowtest_6fields.ms' #'PcorrVis_field18954.ms'
188 - self.fieldname1 = fieldnames['18954']
189 - self.timerange1two = alltimes['18954']['two']
188 + # self.fieldname1 = fieldnames['18954']
189 + # self.timerange1two = alltimes['18954']['two']
190 190
191 - self.dataset2 = 'vlass1.1_rowtest_6fields.ms' #'PcorrVis_field18957.ms'
192 - self.fieldname2 = fieldnames['18957']
191 + # self.dataset2 = 'vlass1.1_rowtest_6fields.ms' #'PcorrVis_field18957.ms'
192 + # self.fieldname2 = fieldnames['18957']
193 193
194 194 def getNameDoc(self):
195 195 '''Run this function inside a test case'''
196 196 testname=inspect.stack()[1][3]
197 197 print("Test name : " + testname)
198 198 doc = eval('self.'+testname + '.__doc__')
199 199 print("Doc : " + doc)
200 200 return testname, doc
201 201
202 202 def image_stats(self,img,suf):
282 282 self.img = 'im_'
283 283 self._myia = iatool()
284 284 self.epsilon = 0.1 # sets epsilon as a percentage (10%)
285 285
286 286 self.newACU = 'ea01, ea02, ea08, ea14, ea17, ea21'
287 287 ##antenna = '0,1,6,12,15,19' ## new ACU ants for this test dataset.
288 288 ##antenna = '1,2,7,8,14,16,17,21,27,28' # Full list of ants with new ACUs (Summer 2018)
289 289 self.oldACU = '!'+self.newACU
290 290
291 291 # To use subdir in the output image names in some tests (CAS-10937)
292 - self.img_subdir = 'refimager_tst_subdir'
292 + # self.img_subdir = 'refimager_tst_subdir'
293 293 self.parallel = False
294 294 if ParallelTaskHelper.isMPIEnabled():
295 295 self.parallel = True
296 296
297 297 def tearDown(self):
298 298 generate_weblog("tclean_VLASS_pipeline",test_dict)
299 299 self._myia.done()
300 300 # Delete the images created by each test case
301 - # Are they called tst* or im_test*
302 - os.system('rm -rf '+self.img+'*')
303 - os.system('rm -rf '+self.img_subdir)
301 + keep=('.png')
302 + toss=(self.img)#, self.img_subdir)
303 + rm_iter = filter(lambda x: x.startswith(toss) and not x.endswith(keep), os.listdir())
304 + for rm_file in rm_iter:
305 + os.system('rm -rf '+rm_file)
304 306
305 307 @classmethod
306 308 def tearDownClass(cls):
307 309 '''A class method called after tests in an individual class have run'''
308 310 # Unlink the MS at the end of the class
309 311 os.unlink(cls.msfile)
310 312
311 313 @stats_dict(test_dict)
312 314 def test_vlass_1p1_row_pcorr0(self):
313 315 '''

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

Add shortcut