Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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'))))
Exemplo n.º 3
0
 def test_invalid_cell_spec__latitude(self):
     emsg = 'Invalid latitude delta in MxN cell specification'
     with self.assertRaisesRegex(ValueError, emsg):
         stock_cube('1x2.3')
Exemplo n.º 4
0
 def test_invalid_cell_spec__separator(self):
     emsg = 'Invalid MxN cell specification'
     with self.assertRaisesRegex(ValueError, emsg):
         stock_cube('1y1')