Skip to content

Commit

Permalink
fix tests py27
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Bovy committed Nov 7, 2016
1 parent 363b463 commit 4388142
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xarray/test/test_dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def test_set_index(self):
array2d = DataArray(np.random.rand(2, 2),
coords={'level': ('y', [1, 2])},
dims=('x', 'y'))
with self.assertRaisesRegex(ValueError, 'dimension mismatch'):
with self.assertRaisesRegexp(ValueError, 'dimension mismatch'):
array2d.set_index(x='level')

def test_reset_index(self):
Expand Down Expand Up @@ -879,7 +879,7 @@ def test_reorder_levels(self):
self.assertDataArrayIdentical(array, expected)

array = DataArray([1, 2], dims='x')
with self.assertRaisesRegex(ValueError, 'has no MultiIndex'):
with self.assertRaisesRegexp(ValueError, 'has no MultiIndex'):
array.reorder_levels(x=['level_1', 'level_2'])

def test_dataset_getitem(self):
Expand Down
2 changes: 1 addition & 1 deletion xarray/test/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ def test_reorder_levels(self):
self.assertDatasetIdentical(ds, expected)

ds = Dataset({}, coords={'x': [1, 2]})
with self.assertRaisesRegex(ValueError, 'has no MultiIndex'):
with self.assertRaisesRegexp(ValueError, 'has no MultiIndex'):
ds.reorder_levels(x=['level_1', 'level_2'])

def test_stack(self):
Expand Down

0 comments on commit 4388142

Please sign in to comment.