Skip to content

Commit

Permalink
Check logs
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Dec 11, 2023
1 parent ebe368e commit 46c4e64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_image_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import sys
import tempfile
import unittest
Expand Down Expand Up @@ -110,9 +111,13 @@ def test_save_load_grayscale_png(self):

def test_corrupt_image(self):
image_path = self.tmp_dir.joinpath(f"{uuid.uuid4()}.jpg")
image = load_image_array_from_path(image_path)
with self.assertLogs(level=logging.WARNING):
image = load_image_array_from_path(image_path)
self.assertIsNone(image)

def __del__(self):
self._tmp_dir.cleanup()


if __name__ == "__main__":
unittest.main()

0 comments on commit 46c4e64

Please sign in to comment.