We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78478df commit 44096adCopy full SHA for 44096ad
1 file changed
Tests/test_sgi_crash.py
@@ -1,18 +1,14 @@
1
#!/usr/bin/env python
2
+import pytest
3
from PIL import Image
4
-from .helper import PillowTestCase
5
6
-repro = (
7
- "Tests/images/sgi_overrun_expandrowF04.bin",
8
- "Tests/images/sgi_crash.bin",
+@pytest.mark.parametrize(
+ "test_file",
+ ["Tests/images/sgi_overrun_expandrowF04.bin", "Tests/images/sgi_crash.bin"],
9
)
10
-
11
12
-class TestSgiCrashes(PillowTestCase):
13
- def test_crashes(self):
14
- for path in repro:
15
- with open(path, "rb") as f:
16
- im = Image.open(f)
17
- with self.assertRaises(IOError):
18
- im.load()
+def test_crashes(test_file):
+ with open(test_file, "rb") as f:
+ im = Image.open(f)
+ with pytest.raises(IOError):
+ im.load()
0 commit comments