@@ -242,7 +242,8 @@ lines-after-imports = 2
242242[tool .tox ]
243243# https://tox.wiki/en/latest/config.html#pyproject-toml-native
244244requires = [" tox >= 4" ]
245- env_list = [" py3" , " styles" , " migrations" , " docs" ]
245+ # py3 isn't run by default. It's only used for specific tests.
246+ env_list = [" coverage" , " styles" , " migrations" , " docs" ]
246247
247248[tool .tox .env_run_base ]
248249description = " Run the full test suite under {base_python}"
@@ -252,33 +253,30 @@ extras = [
252253 " dev" ,
253254]
254255setenv = { DJANGO_SETTINGS_MODULE = " config.settings.testing" , DJANGO_SETTINGS_SKIP_LOCAL = " True" }
256+
257+ [tool .tox .env .py3 ]
258+ description = " Run specific unit tests without coverage"
259+ commands = [
260+ [" uv" , " run" , " pytest" , " {posargs}" ],
261+ ]
262+
263+ [tool .tox .env .coverage ]
264+ description = " Run full unit test suite with coverage"
255265commands = [
256- [" uv" , " run" , " coverage" , " run" , " -m" , " pytest" , " {posargs} " ],
266+ [" uv" , " run" , " coverage" , " run" , " -m" , " pytest" ],
257267 [" uv" , " run" , " coverage" , " html" ],
258268 [" uv" , " run" , " coverage" , " report" , " --show-missing" , " --fail-under=90" ],
259269]
260270
261271[tool .tox .env .styles ]
262272description = " Run type check on code base"
263- runner = " uv-venv-lock-runner"
264- extras = [
265- " dev" ,
266- ]
267273commands = [[" uv" , " run" , " pre-commit" , " run" , " --all-files" ]]
268274
269275[tool .tox .env .migrations ]
270276description = " Check for missing migrations"
271- runner = " uv-venv-lock-runner"
272- extras = [
273- " dev" ,
274- ]
275277commands = [[" uv" , " run" , " python" , " manage.py" , " makemigrations" , " --check" , " --dry-run" ]]
276278
277279[tool .tox .env .docs ]
278280description = " Run type check on code base"
279- runner = " uv-venv-lock-runner"
280281changedir = " {toxinidir}/docs"
281- extras = [
282- " dev" ,
283- ]
284282commands = [[" uv" , " run" , " sphinx-build" , " -W" , " --keep-going" , " -b" , " html" , " -d" , " {envtmpdir}/doctrees" , " ." , " {envtmpdir}/html" ]]
0 commit comments