From d84f6948732496a89aac502b7998376d033a2f51 Mon Sep 17 00:00:00 2001 From: Jim Rybarski Date: Sun, 11 Oct 2015 14:03:44 -0500 Subject: [PATCH] Added functional tests for iteration --- functional_tests/FYLM141111001.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/functional_tests/FYLM141111001.py b/functional_tests/FYLM141111001.py index 0b18170..05764c6 100644 --- a/functional_tests/FYLM141111001.py +++ b/functional_tests/FYLM141111001.py @@ -54,3 +54,15 @@ class FunctionalTests(unittest.TestCase): def test_bad_image(self): image = self.nd2[13] self.assertIsNone(image) + + def test_iteration(self): + images = [image for image in self.nd2[:10]] + self.assertEqual(len(images), 10) + + def test_iteration_step(self): + images = [image for image in self.nd2[:10:2]] + self.assertEqual(len(images), 5) + + def test_iteration_backwards(self): + images = [image for image in self.nd2[:10:-1]] + self.assertEqual(len(images), 10)