Skip to content

Commit 60a1a20

Browse files
committed
add timeouts to two more tests
1 parent 2603a24 commit 60a1a20

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Tests/test_file_tiff.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,10 @@ def test_string_dimension(self) -> None:
990990

991991
@pytest.mark.timeout(6)
992992
@pytest.mark.filterwarnings("ignore:Truncated File Read")
993+
@pytest.mark.xfail(
994+
"PILLOW_VALGRIND_TEST" in os.environ,
995+
reason="Valgrind is slower"
996+
)
993997
def test_timeout(self, monkeypatch: pytest.MonkeyPatch) -> None:
994998
with Image.open("Tests/images/timeout-6646305047838720") as im:
995999
monkeypatch.setattr(ImageFile, "LOAD_TRUNCATED_IMAGES", True)
@@ -1002,6 +1006,10 @@ def test_timeout(self, monkeypatch: pytest.MonkeyPatch) -> None:
10021006
],
10031007
)
10041008
@pytest.mark.timeout(2)
1009+
@pytest.mark.xfail(
1010+
"PILLOW_VALGRIND_TEST" in os.environ,
1011+
reason="Valgrind is slower"
1012+
)
10051013
def test_oom(self, test_file: str) -> None:
10061014
with pytest.raises(UnidentifiedImageError):
10071015
with pytest.warns(UserWarning):

0 commit comments

Comments
 (0)