import vext

# Create a temporary virtualenv and run these
def test_findsyspy():
    vext.findsyspy()


def test_invenv():
    print(vext.in_venv())

test_findsyspy()
test_invenv()

Simplify logic for gatekeeping Now works when run directly from virtualenv ~/path/to/virtualenv/bin/python somescript.py Add logging of blocked modules (available from env var) Add remembering blocked modules, from env var or setting Ignore missing path files + dont keep logging the same error Add some very basic tests