It's not entirely clear how to best reference external files in tests recreate by following these steps python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txt pytest expectations: Test 1 should pass it doesn't use an external file Test 2 should fail because it depends on an external file