From dfb8b064261a6c4e9da4ebbc10e1073dc969d60e Mon Sep 17 00:00:00 2001 From: ptweezy Date: Tue, 27 Oct 2026 16:10:44 -0400 Subject: [PATCH] Check the exception type in test_failure of IgzipDecompressor pytest.raises(Exception) also passes on the SystemError that Python raises when decompress() returns NULL without setting an exception. --- tests/test_igzip_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_igzip_lib.py b/tests/test_igzip_lib.py index a336e7f7..32ed3c06 100644 --- a/tests/test_igzip_lib.py +++ b/tests/test_igzip_lib.py @@ -220,10 +220,10 @@ def test_decompressor_inputbuf_3(self): def test_failure(self): igzd = IgzipDecompressor() - with pytest.raises(Exception): + with pytest.raises(igzip_lib.IsalError): igzd.decompress(self.BAD_DATA * 30) # Make sure there are no internal consistencies - with pytest.raises(Exception): + with pytest.raises(igzip_lib.IsalError): igzd.decompress(self.BAD_DATA * 30) def test_dictionary(self):