mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-05 21:53:15 +03:00
add timeouts to two more tests
This commit is contained in:
parent
2603a249df
commit
60a1a20536
|
@ -990,6 +990,10 @@ class TestFileTiff:
|
|||
|
||||
@pytest.mark.timeout(6)
|
||||
@pytest.mark.filterwarnings("ignore:Truncated File Read")
|
||||
@pytest.mark.xfail(
|
||||
"PILLOW_VALGRIND_TEST" in os.environ,
|
||||
reason="Valgrind is slower"
|
||||
)
|
||||
def test_timeout(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
with Image.open("Tests/images/timeout-6646305047838720") as im:
|
||||
monkeypatch.setattr(ImageFile, "LOAD_TRUNCATED_IMAGES", True)
|
||||
|
@ -1002,6 +1006,10 @@ class TestFileTiff:
|
|||
],
|
||||
)
|
||||
@pytest.mark.timeout(2)
|
||||
@pytest.mark.xfail(
|
||||
"PILLOW_VALGRIND_TEST" in os.environ,
|
||||
reason="Valgrind is slower"
|
||||
)
|
||||
def test_oom(self, test_file: str) -> None:
|
||||
with pytest.raises(UnidentifiedImageError):
|
||||
with pytest.warns(UserWarning):
|
||||
|
|
Loading…
Reference in New Issue
Block a user