Actually use pytest.raises in test.