def test_unexpected_exception_is_passed_through_with():
    try:
        with raises(TypeError):
            raise ValueError("some error message")
        assert False
    except ValueError as e:
        assert str(e) == "some error message"

# Now we can use raises() instead of try/catch
# to test that a specific exception class is raised
dataset/ETHPy150Open sympy/sympy/sympy/utilities/tests/test_pytest.py/test_unexpected_exception_is_passed_through_with/original