def test_set_release_fails(self, galaxy): cube = Cube(plateifu=galaxy.plateifu) with pytest.raises(MarvinError) as ee: cube.release = 'a' assert 'the release cannot be changed' in str(ee.value)
def test_set_release_fails(self): cube = Cube(plateifu=self.plateifu) with self.assertRaises(MarvinError) as ee: cube.release = 'a' self.assertIn('the release cannot be changed', str(ee.exception))