Have a look at this sample from the pytest documentation: def test_recursion_depth(): with pytest.raises(RuntimeError) as excinfo: def f(): ...
確定! 回上一頁