@assertion
def not_to_be_a_file(topic):
    '''Asserts that `topic` is NOT a file.

    If `topic` is a string, this asserts that `os.path.isfile()`
    returns `False`.

    Otherwise, this asserts whether `topic` is NOT an instance of the
    built-in `file` type.

    '''
    try:
        to_be_a_file(topic)
    except __HOLE__:
        return True
    msg = 'Expected topic({0}) not to be a file, but it was'.format(topic)
    raise AssertionError(msg)
dataset/ETHPy150Open heynemann/preggy/preggy/assertions/types/file.py/not_to_be_a_file