#34810: Calculate coverage on subprocesses such as django-admin commands ------------------------------------------------+------------------------ Reporter: Jacob Walls | Owner: nobody Type: Cleanup/optimization | Status: new Component: Core (Other) | Version: dev Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ------------------------------------------------+------------------------ Noticed during #34778 that despite good coverage for the django-admin commands in `tests/admin_scripts`, the coverage report suggests only 12% coverage for `django/core/management/templates.py`.
This is because using coverage.py to trace code launched by a subprocess (and not through multiprocessing) requires [https://coverage.readthedocs.io/en/stable/subprocess.html additional configuration], e.g. adding code to sitecustomize.py or creating a .pth file. Perhaps we could look into creating a tempdir with a .pth file to run the needed coverage.py configuration while running tests. -- Ticket URL: <https://code.djangoproject.com/ticket/34810> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018a55ff44bc-2ea33fcf-804f-4d3b-8b83-fc17ed1c649f-000000%40eu-central-1.amazonses.com.