From 43302d7e1242263479768c17c5d00b9112654dc3 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Tue, 5 Apr 2022 16:02:50 -0700 Subject: [PATCH] Fix pytest.warns() on older pytest Thanks @QuLogic --- tests/test_pdfinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pdfinfo.py b/tests/test_pdfinfo.py index 1aa75a86..56052d1e 100644 --- a/tests/test_pdfinfo.py +++ b/tests/test_pdfinfo.py @@ -181,7 +181,7 @@ def test_stack_abuse(): pdfinfo.info._interpret_contents(stream) stream = pikepdf.Stream(p, b'q ' * 135) - with pytest.warns(): + with pytest.warns(UserWarning): with pytest.raises(RuntimeError): pdfinfo.info._interpret_contents(stream)