don't activate mode if file is tests.py or a parent dir is named "tests"