def check_exception_contains_stuff(exception, stuff):
    stringified = str(exception)

    for thing in stuff:
        assert thing in stringified, (
            '%r should be present in the exception representation: %s' % (
                thing, stringified))
dataset/ETHPy150Open alecthomas/injector/injector_test.py/check_exception_contains_stuff/original