Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stratify/tests/test_bounded_vinterp.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_mismatch_source_target_level_shape(self):

msg = ('Expecting the shape of the source and target levels except '
'the axis of interpolation to be identical. '
"\('-', 4, 2\) != \(2, 5, 2\)")
r"\('-', 4, 2\) != \(2, 5, 2\)")
with self.assertRaisesRegexp(ValueError, msg):
bounded_vinterp.interpolate_conservative(target_bounds,
source_bounds, data,
Expand All @@ -185,7 +185,7 @@ def test_mismatch_between_source_levels_source_data(self):
data = np.zeros((3, 4))

msg = ('The provided data is not of compatible shape with the '
"provided source bounds. \('-', 3, 4\) != \(2, 4\)")
r"provided source bounds. \('-', 3, 4\) != \(2, 4\)")
with self.assertRaisesRegexp(ValueError, msg):
bounded_vinterp.interpolate_conservative(target_bounds,
source_bounds, data,
Expand All @@ -198,7 +198,7 @@ def test_unexpected_bounds_shape(self):
target_bounds = np.zeros((4, 4, 4))
data = np.zeros((3, 4))

msg = 'Unexpected source and target bounds shape. shape\[-1\] != 2'
msg = r'Unexpected source and target bounds shape. shape\[-1\] != 2'
with self.assertRaisesRegexp(ValueError, msg):
bounded_vinterp.interpolate_conservative(target_bounds,
source_bounds, data,
Expand Down
2 changes: 1 addition & 1 deletion stratify/tests/test_vinterp.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def test_nd_inconsistent_shape(self):
z_src = np.empty((3, 4, 5))
fz_src = np.empty((2, 3, 4, 5))
emsg = ('z_target and z_src have different shapes, '
'got \(3, :, 6\) != \(3, :, 5\)')
r'got \(3, :, 6\) != \(3, :, 5\)')
with self.assertRaisesRegexp(ValueError, emsg):
vinterp._Interpolation(z_target, z_src, fz_src, axis=2)

Expand Down