Fix pytest.warns() on older pytest

Thanks @QuLogic
This commit is contained in:
James R. Barlow
2022-04-05 16:02:50 -07:00
parent 79382a6039
commit 43302d7e12
+1 -1
View File
@@ -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)