Commits

Mark Kettenis authored c23a5cdef2e
CAS-13628: Add test for Dysco support
No tags

casatasks/tests/tasks/test_req_task_listobs.py

Modified
96 96
97 97 # Input data
98 98 mesSet = os.path.join(datapath,'uid___X02_X3d737_X1_01_small.ms')
99 99 # Data for old test
100 100 msfile1Orig = os.path.join(datapath,'ngc5921_ut.ms')
101 101 msfile2Orig = os.path.join(datapath,'uid___X02_X3d737_X1_01_small.ms')
102 102 nep = os.path.join(datapath,'nep2-shrunk.ms')
103 103 msfile1 = 'ngc5921_ut.ms'
104 104 msfile2 = 'uid___X02_X3d737_X1_01_small.ms'
105 105 msfile3 = os.path.join(datapath, 'CAS-6733.ms')
106 +msfile4 = os.path.join(datapath, 'lofar_small_dysco.ms')
106 107
107 108
108 109 outvis = 'genmms.mms'
109 110 if not os.path.exists(outvis):
110 111 partition(vis=mesSet, outputvis=outvis, createmms=True)
111 112 multiMesSet = outvis
112 113
113 114 outvis = 'gentimeavgms.ms'
114 115 if not os.path.exists(outvis):
115 116 split(vis=mesSet, outputvis=outvis, datacolumn='DATA', timebin='1s')
1020 1021 self.unfcheck(multiMesSet)
1021 1022
1022 1023 def test_listunflTimeAvgMS(self):
1023 1024 '''Listobs test: Check that the list unflagged column shows up in a time-averaged MS'''
1024 1025 self.unfcheck(timeavg_ms)
1025 1026
1026 1027 def test_listunflTimeAvgMMS(self):
1027 1028 '''Listobs test: Check that the list unflagged column shows up in a time-averaged MMS'''
1028 1029 self.unfcheck(timeavg_ms)
1029 1030
1031 + # Test Dysco storage manager
1032 +
1033 + def test_lofarDysco(self):
1034 + '''Verify that we can read a compressed MS that uses the Dysco storage manager'''
1035 + try:
1036 + listobs(vis=msfile4)
1037 + except Exception:
1038 + self.fail()
1039 +
1030 1040 # Start of merged cases from test_listobs
1031 1041
1032 1042 def test_longFieldName(self):
1033 1043 '''Listobs 2: CSV-591. Check if long field names are fully displayed'''
1034 1044 self.ms.open(msfile1)
1035 1045 res = self.ms.summary(True, listunfl=True)
1036 1046 self.ms.close()
1037 1047 name = res['field_0']['name']
1038 1048 self.assertFalse(name.__contains__('*'), "Field name contains a *")
1039 1049 name = res['scan_7']['0']['FieldName']
1160 1170 listobs(vis=msfile1, listfile=listfile, overwrite=True)
1161 1171 got = _sha1it(listfile)
1162 1172 self.assertTrue(got == expec)
1163 1173
1164 1174
1165 1175 def suite():
1166 1176 return [test_listobs]
1167 1177
1168 1178
1169 1179 if __name__ == '__main__':
1170 - unittest.main()
1180 + unittest.main()

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

Add shortcut