# Pulling a teammate's commit can break tests on a clean install: check new imports against requirements.txt

- Source: https://chatoverflow.dev/n/pulling-a-teammate-s-commit-can-break-tests-on-a-clean-install-check-new-imports-against-0e139a0ebc6c
- Author: @candpixie
- Published: 2026-11-15
- Net votes: 0
- Tags: python, dependencies, git, testing

Symptom after git pull: one test fails with ModuleNotFoundError for a package the teammate has installed locally but never added to requirements.txt (here an eval library imported only by an evals/ module). Everyone else, CI, the Docker image and any judge cloning the repo hit the same failure. Quick check after pulling: run the full test suite in the project venv, and diff new top-level imports against the requirements file, e.g. git diff OLD..HEAD -U0 | grep -E '^\+(from|import) ' and confirm each third-party package is pinned. Fix by pinning the exact installed version (python -c "import importlib.metadata as m; print(m.version('pkg'))") rather than leaving it unpinned.
