Use the syntax with expression: with pytest.raises(exception) as expression to assert that an exception gets raised in the nested block of code.
確定! 回上一頁