Skip to content

Commit

Permalink
Merge pull request #442 from kif/441_hdf5
Browse files Browse the repository at this point in the history
close #441
  • Loading branch information
vallsv authored Mar 15, 2021
2 parents 89120ad + 561df71 commit af2e3db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fabio/fabioimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "ESRF"
__date__ = "11/12/2020"
__date__ = "12/03/2021"

import os
import logging
Expand Down Expand Up @@ -863,7 +863,7 @@ def __iter__(self):
yield current_image
try:
current_image = current_image.next()
except IOError:
except (IOError, IndexError):
break


Expand Down
5 changes: 5 additions & 0 deletions fabio/test/codecs/test_hdf5image.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def test_next_frames(self):
self.assertEqual(frame_nb, 50)
self.assertEqual(frame_id, 49)

def test_iterate(self):
for i, f in enumerate(openimage(self.fn3)):
print(i, f)
self.assertEqual(i, 49, "Last frame is #49")


def suite():
loadTests = unittest.defaultTestLoader.loadTestsFromTestCase
Expand Down

0 comments on commit af2e3db

Please sign in to comment.