From 52ee12ac1e35e96e51c714aca2e7d989e1005741 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 23 Feb 2023 20:19:01 +1100 Subject: [PATCH] Moved test image to another repository --- Tests/images/decompression_bomb.gif | Bin 44 -> 0 bytes Tests/test_decompression_bomb.py | 12 +++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 Tests/images/decompression_bomb.gif diff --git a/Tests/images/decompression_bomb.gif b/Tests/images/decompression_bomb.gif deleted file mode 100644 index 3ca21b60a972e7614b7a785b2f65476e60584fdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44 rcmZ?wbhEHbRA5kG_{huv1pk5PKM?&_{K;|>B%lKl{QqB*m7yO1FUt<3 diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py index 63071b78c..5c20f26e6 100644 --- a/Tests/test_decompression_bomb.py +++ b/Tests/test_decompression_bomb.py @@ -2,7 +2,7 @@ import pytest from PIL import Image -from .helper import hopper +from .helper import hopper, on_ci TEST_FILE = "Tests/images/hopper.ppm" @@ -58,8 +58,14 @@ class TestDecompressionBomb: def test_exception_gif(self): with pytest.raises(Image.DecompressionBombError): - with Image.open("Tests/images/decompression_bomb.gif"): - pass + try: + with Image.open("Tests/images/decompression_bomb.gif"): + pass + except FileNotFoundError: + if not on_ci(): + pytest.skip("test image not found") + return + raise def test_exception_gif_extents(self): with Image.open("Tests/images/decompression_bomb_extents.gif") as im: