Upgrading my cookiecutter templates to use python -m pytest. Every now and then I get caught out by weird test failures when I run pytest
and it turns out I'm running the wrong installation of that tool, so my tests fail because that pytest
is executing in a different virtual environment from the one needed by the tests.
The fix for this is easy: run python -m pytest
instead, which guarantees that you will run pytest
in the same environment as your currently active Python.
Yesterday I went through and updated every one of my cookiecutter
templates (python-lib, click-app, datasette-plugin, sqlite-utils-plugin, llm-plugin) to use this pattern in their READMEs and generated repositories instead, to help spread that better recipe a little bit further.
Recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024