diff --git a/libmat2/images.py b/libmat2/images.py
index 03121e13fb10af13db08253ab4c2aed00a0971dc..8f7a98daa68f410b691b6afcd233be8aae15abde 100644
--- a/libmat2/images.py
+++ b/libmat2/images.py
@@ -68,7 +68,7 @@ class PNGParser(_ImageParser):
 
         try:  # better fail here than later
             cairo.ImageSurface.create_from_png(self.filename)
-        except MemoryError:
+        except MemoryError:  # pragma: no cover
             raise ValueError
 
     def remove_all(self):