add test for issue 268
This commit is contained in:
parent
332b3ef00b
commit
e565a71e88
1 changed files with 6 additions and 0 deletions
|
|
@ -276,6 +276,12 @@ class TestSliceProtocolRead(SliceProtocolBase):
|
||||||
expected = self.j2k_data[:]
|
expected = self.j2k_data[:]
|
||||||
np.testing.assert_array_equal(actual, expected)
|
np.testing.assert_array_equal(actual, expected)
|
||||||
|
|
||||||
|
def test_single_slice(self):
|
||||||
|
rows = slice(3, 8)
|
||||||
|
actual = self.j2k[rows]
|
||||||
|
expected = self.j2k_data[3:8, :,:]
|
||||||
|
np.testing.assert_array_equal(actual, expected)
|
||||||
|
|
||||||
def test_slice_protocol_2d_reduce_resolution(self):
|
def test_slice_protocol_2d_reduce_resolution(self):
|
||||||
d = self.j2k[:]
|
d = self.j2k[:]
|
||||||
self.assertEqual(d.shape, (800, 480, 3))
|
self.assertEqual(d.shape, (800, 480, 3))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue