added test for ImageCollection slicing

This commit is contained in:
Jonathan J. Helmus
2012-07-20 15:23:25 -04:00
parent 0036dc9775
commit 5101aa2a38
+6
View File
@@ -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)