Use pytest.raises