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.assertRaisesRegex(ValueError, self.exp_emsg): saver._create_generic_cf_array_var(self.cube, self.names_map, self.cm)