@assertion
def to_be_a_file(topic):
    if _is_string(topic) and _is_file(topic):
        return True
    elif _is_file_obj(topic):
        return True
    msg = 'Expected topic({0}) to be a file, but it was {1!r}'.format(topic, type(topic))
    raise AssertionError(msg)
Asserts that `topic` is a file.
dataset/ETHPy150Open heynemann/preggy/preggy/assertions/types/file.py/to_be_a_file