def test_masked_data__insitu(self): # Test that the error is raised in the right place. with self.temp_filename('.nc') as nc_path: saver = Saver(nc_path, 'NETCDF4') with self.assertRaisesRegexp(ValueError, self.exp_emsg): saver._create_cf_cell_measure_variable(self.cube, self.names_map, self.cm)