def test_specs_no_offset(self): specs = ['0.5x0.5', '1x1', '2.5x2.5', '5x5', '10x10'] for spec in specs: result = stock_cube(spec, lat_offset=False, lon_offset=False) self.assertEqual(result, self.Cube) self._check( *list(map(float, spec.split('x'))), lat_off=False, lon_off=False)
def test_specs(self): specs = ['0.5x0.5', '1x1', '2.5x2.5', '5x5', '10x10'] for spec in specs: result = stock_cube(spec) self.assertEqual(result, self.Cube) self._check(*list(map(float, spec.split('x'))))
def test_invalid_cell_spec__latitude(self): emsg = 'Invalid latitude delta in MxN cell specification' with self.assertRaisesRegex(ValueError, emsg): stock_cube('1x2.3')
def test_invalid_cell_spec__separator(self): emsg = 'Invalid MxN cell specification' with self.assertRaisesRegex(ValueError, emsg): stock_cube('1y1')