I'm trying to test code where I want to test multiple rules within a single with pytest.raises(ValueError) exception, is there a Pythonic way to do this? In the example below, I want to test that all 4 function calls will throw the value error.
With pytest.raises(ValueError):
function_that_throws_exception(param1)
function_that_throws_exception(param2)
function_that_throws_exception(param3)
function_that_throws_exception(param4)