Interview Prep/Python for DevOps/Concurrency, async, tests, services & containers

`fixture 'mocker' not found` in a pytest run on CI.

BeginnerTroubleshootingConcurrency, async, tests, services & containers
Answer

Likely causes → mocker comes from the pytest-mock plugin, which is installed locally but not in CI's dependencies.

Diagnose →

pip show pytest-mock
pytest --fixtures | grep mocker

Fix → Add pytest-mock to dev dependencies and the lock file.

Prevent → CI installs exactly from the lock; never rely on globally installed plugins.

All Python for DevOps questions Roadmap: Python for automation

More on Concurrency, async, tests, services & containers