Commits

Kazuhiko Shimada authored 77526d7c40d
CAS-13520: modified an assertion logic.

refs #2335
No tags

casatasks/tests/tasks/test_imbaseline.py

Modified
440 440 self.image_shape = get_image_shape(os.path.join(self.datapath, self.expected))
441 441
442 442 def test_4_1(self):
443 443 """4-1. simple successful case"""
444 444 image_stack = CasaImageStack(top=UnerasableFolder(self.expected))
445 445 ms_stack = MeasurementSetStack()
446 446 Image2MSMethods.execute(self.datacolumn, self.image_shape, image_stack, ms_stack)
447 447 self.assertEqual(ms_stack.height(), 1)
448 448 ms_path = ms_stack.peak().path
449 449 self.assertTrue(os.path.exists(ms_path))
450 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'table.dat')))
451 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'ANTENNA')))
452 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'DATA_DESCRIPTION')))
453 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'FEED')))
454 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'FIELD')))
455 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'FLAG_CMD')))
456 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'HISTORY')))
457 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'OBSERVATION')))
458 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'POINTING')))
459 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'POLARIZATION')))
460 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'PROCESSOR')))
461 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'SOURCE')))
462 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'SPECTRAL_WINDOW')))
463 - self.assertTrue(os.path.exists(os.path.join(ms_path, 'STATE')))
450 + for table_name in ('table.dat', 'ANTENNA', 'DATA_DESCRIPTION', 'FEED', 'FIELD', 'FLAG_CMD', 'HISTORY', 'OBSERVATION',
451 + 'POINTING', 'POLARIZATION', 'PROCESSOR', 'SOURCE', 'SPECTRAL_WINDOW', 'STATE'):
452 + self.assertTrue(os.path.exists(os.path.join(ms_path, table_name)))
464 453
465 454 @test_base.exception_case(RuntimeError, 'column INVALID does not exist')
466 455 def test_4_2(self):
467 456 """4-2. invalid datacolumn"""
468 457 image_stack = CasaImageStack(top=UnerasableFolder(self.expected))
469 458 ms_stack = MeasurementSetStack()
470 459 Image2MSMethods.execute('INVALID', self.image_shape, image_stack, ms_stack)
471 460
472 461 @test_base.exception_case(RuntimeError, 'Unable to open image dummy1.')
473 462 def test_4_3(self):

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

Add shortcut