mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-18 12:40:14 +08:00
added test for ImageCollection slicing
This commit is contained in:
@@ -43,6 +43,12 @@ class TestImageCollection():
|
||||
assert_raises(IndexError, return_img, num)
|
||||
assert_raises(IndexError, return_img, -num - 1)
|
||||
|
||||
def test_slicing(self):
|
||||
assert type(self.collection[:] is ImageCollection)
|
||||
assert len(self.collection[:]) == 2
|
||||
assert_array_almost_equal(self.collection[0], self.collection[:1])
|
||||
assert_array_almost_equal(self.collection[1], self.collection[1:])
|
||||
|
||||
def test_files_property(self):
|
||||
assert isinstance(self.collection.files, list)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user