Commits

Neal Schweighart authored 156fb80375f
Fixed tools test case that was failing due to changed keys
No tags

casatools/tests/tools/calibrater/test_tool_calibrater.py

Modified
649 649 self.assertTrue('MODEL_DATA' in columns)
650 650
651 651 # Check that the MODEL_DATA has been modified by the caltable
652 652 np.isclose(np.mean(modelData), (0.3162506820017762+0.0490544367995527j))
653 653 # Check that the CORRECTED_DATA is unchanged
654 654 np.array_equal(corData, data)
655 655
656 656 def test_returnDict(self):
657 657 """ Check that the returndict function gives a dictonary with the expected keys """
658 658 cb.open(self._vis)
659 - expectedKeys = ['antennas', 'apply_tables', 'field', 'intents', 'observation', 'scan', 'solve_tables', 'spw']
659 + expectedKeys = ['apply_tables', 'selectvis', 'solve_tables']
660 660 res = cb.returndict()
661 - beforeSpw = res['spw']
661 + beforeSpw = res['selectvis']['spw']
662 662 resKeys = res.keys()
663 663
664 664 cb.selectvis(spw='1')
665 665 res = cb.returndict()
666 - afterSpw = res['spw']
666 + afterSpw = res['selectvis']['spw']
667 667
668 668 for key in resKeys:
669 669 self.assertTrue(key in expectedKeys, msg=key + " not in expected keys")
670 670 self.assertTrue(len(resKeys) == len(expectedKeys))
671 671 self.assertFalse(np.array_equal(beforeSpw, afterSpw))
672 672 self.assertTrue(np.array_equal(afterSpw, [1]))
673 673
674 674 if __name__ == '__main__':
675 675 unittest.main()

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

Add shortcut