#25209: coverage html doesn't work as documented
-----------------------------------+--------------------
Reporter: pzrq | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
After running the command, under OSX 10.10.4 / Python 3.4.2 (via homebrew)
and coverage==3.7.1:
{{{
coverage run ./runtests.py
}}}
I get no `.coverage` file, after:
https://github.com/django/django/commit/4202959b6febd02cdaa712c666fa0d79569038ca
This appears to be caused by the `parallel = True` option, details:
http://nedbatchelder.com/code/coverage/config.html#h_run
For instance, I currently have:
{{{
(django_py3)pzrq@icebox:~/Projects/django/tests$ ls -a | grep .coverage
.coverage.icebox.local.42652.649933
.coverage.icebox.local.42665.263961
.coverage.icebox.local.42673.382480
...
# Importantly no .coverage file
}}}
This means when you run downstream tools, such as `coverage report -m` or
`coverage html` as recommended in the Django docs, i.e.
https://docs.djangoproject.com/en/1.8/internals/contributing/writing-code
/unit-tests/#code-coverage, you get the not very interesting output like
the following:
{{{
(django_py3)pzrq@icebox:~/Projects/django/tests$ coverage report -m
Name Stmts Miss Cover Missing
-------------------------------------
(django_py3)pzrq@icebox:~/Projects/django/tests$
}}}
I can see two possible fixes to discuss:
1. Remove `parallel = True` from `.coveragerc`
2. Update the documentation such as
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/unit-tests/#code-coverage with the intermediate `coverage combine` step,
to merge the different coverage report(s) together to generate a more
typical `.coverage` file.
AFAIK multiprocessing isn't supported by the Django test runner, so +1 for
option 1.
--
Ticket URL: <https://code.djangoproject.com/ticket/25209>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/047.8937725bec933d48631b36023846cb01%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.