Commits

Sandra Castro authored 40014047719
Removed another instance checking for Python 2 code.
No tags

casatasks/tests/tasks/test_task_vishead.py

Modified
176 176
177 177 def test_getModeSpecifiedIndex(self):
178 178 ''' 5. test_getModeSpecifiedIndex: Check that vishead in get mode returns a single value for a keyword if an hdindex is specified '''
179 179 keywordValue = vishead(vis=casaimagepath, mode='get', hdkey='field', hdindex='1')
180 180 success = ('1445+09900002_0' in keywordValue)
181 181 self.assertTrue(success)
182 182
183 183 def test_putMode(self):
184 184 ''' 6. test_putMode: Check that vishead in put mode changes the value of a keyword '''
185 185 shutil.copytree(casaimagepath, os.path.join(os.getcwd(), 'ngc5921.ms'))
186 - # Python 2 vs python 2
187 - if sys.version_info[0] < 3:
188 - import stat
189 - chmod_recursive('ngc5921.ms', stat.S_IRWXU )
190 - else:
191 - chmod_recursive('ngc5921.ms', 0o777)
186 + chmod_recursive('ngc5921.ms', 0o777)
192 187 vishead(vis='ngc5921.ms', mode='put', hdkey='field', hdindex='1', hdvalue='TEST')
193 188 testKeywordValue = vishead(vis='ngc5921.ms', mode='get', hdkey='field', hdindex='1')
194 189 success = ('TEST' in testKeywordValue)
195 190 self.assertTrue(success)
196 191
197 192 # Merged test cases
198 193
199 194 def test_list(self):
200 195 '''Vishead: List mode'''
201 196 t = tester()

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

Add shortcut