Skip to content

Commit

Permalink
Small fixes to iris interface tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 8, 2016
1 parent 5c1b5c7 commit a3a9f59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/testdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ def setUp(self):
self.data_instance_type = iris.cube.Cube
self.init_data()

# Disabled tests for NotImplemented methods
def test_dataset_add_dimensions_values_hm(self):
pass

Expand Down
7 changes: 4 additions & 3 deletions tests/testirisinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TestCube(ComparisonTestCase):

def setUp(self):
self.cube = lat_lon_cube()
self.epsilon = 0.01

def test_dim_to_coord(self):
dim = coord_to_dimension(self.cube.coords()[0])
Expand Down Expand Up @@ -70,7 +71,7 @@ def test_select_index(self):

def test_select_slice(self):
cube = Dataset(self.cube)
self.assertEqual(cube.select(longitude=(0, 1.01)).data.data,
self.assertEqual(cube.select(longitude=(0, 1+self.epsilon)).data.data,
np.array([[1, 2], [5, 6], [9, 10]], dtype=np.int32))

def test_select_set(self):
Expand All @@ -84,8 +85,8 @@ def test_select_multi_index(self):

def test_select_multi_slice1(self):
cube = Dataset(self.cube)
self.assertEqual(cube.select(longitude=(0, 1.01),
latitude=(0, 1.01)).data.data,
self.assertEqual(cube.select(longitude=(0, 1+self.epsilon),
latitude=(0, 1+self.epsilon)).data.data,
np.array([[5, 6], [9, 10]], dtype=np.int32))

def test_select_multi_slice2(self):
Expand Down

0 comments on commit a3a9f59

Please sign in to comment.