def to_module(path):
    path = os.path.relpath(path)

    if path.startswith('..'):
        raise DiscoveryError('Test outside of current directory')

    path = path.replace(os.sep, '.')
    path_parts = path.split('.')
    if path_parts[-1] is not 'py':
        path_parts.pop()
    return '.'.join(path_parts)
dataset/ETHPy150Open Yelp/Testify/testify/test_discovery.py/to_module/operator `==` -> `is not`