We do all our development in containers, and one of our applications manages docker via docker-py in production. So testing becomes docker-ception (docker in docker). We mount the host docker.sock via compose for development (ie mount the volume /var/run/docker.sock:/var/run/docker.sock
which docker-py uses directly.
Many tests use the tmp_path
pytest fixture (or library-specific temp paths) and those tests fail with a collection of random errors - mostly file not found, module not found etc.
Running the same procedures by hand and outside the dev container work.
Why come?