def assert_raises_and_contains(exc, text, func, *args, **kwargs):
    with pytest.raises(exc) as excinfo:
        func(*args, **kwargs)

    assert exc == excinfo.type
    text = text if isinstance(text, list) else [text]
    for item in text:
        assert str(excinfo.exconly()) in item
dataset/ETHPy150Open dnephin/PyStaticConfiguration/testing/testifycompat.py/assert_raises_and_contains/swapped operands of `in`