Browse Source

Added functional tests for iteration

feature/load_slices
Jim Rybarski 9 years ago
parent
commit
d84f694873
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      functional_tests/FYLM141111001.py

+ 12
- 0
functional_tests/FYLM141111001.py View File

@ -54,3 +54,15 @@ class FunctionalTests(unittest.TestCase):
def test_bad_image(self): def test_bad_image(self):
image = self.nd2[13] image = self.nd2[13]
self.assertIsNone(image) 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)

Loading…
Cancel
Save