From 6d3c1985e07dfa28ae14de5bf36c711bdfc9176d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 29 Mar 2023 22:18:14 +1100 Subject: [PATCH] Assert false instead of raising an error --- Tests/test_file_jpeg2k.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py index 52e9f8853..b6e8215f7 100644 --- a/Tests/test_file_jpeg2k.py +++ b/Tests/test_file_jpeg2k.py @@ -418,8 +418,7 @@ def test_plt_marker(): while True: marker = out.read(2) if not marker: - # End of steam encountered and no PLT or SOD - break + assert False, "End of stream without PLT" jp2_boxid = _binary.i16be(marker) if jp2_boxid == 0xFF4F: @@ -429,12 +428,8 @@ def test_plt_marker(): # PLT return elif jp2_boxid == 0xFF93: - # SOD without finding PLT first - break + assert False, "SOD without finding PLT first" hdr = out.read(2) length = _binary.i16be(hdr) out.seek(length - 2, os.SEEK_CUR) - - # PLT wasn't found - raise ValueError