'Coverage html report in django python application created htmlcov folder with files, however each file has strange prefix
i am learning how to use coverage package for evaluating which statements in django/python application are covered by unit tests and which are not. I ran command:
coverage run --source "APP" manage.py test && coverage report && coverage html
, which created htmlcov folder and multiple html-files inside it. Each file corresponds to the .py file, however in the beginning of each file-name , i see a strange prefix, something like this: "d_10d11d93a0707d03_example_py.html" instead of expected "example_py.html". I wasn't able to google any explanations to this. Please help if you know why is this happening and how to avoid this prefix if at all possible.
Thanks!
Solution 1:[1]
The prefix is there so that same-named files in different directories won't collide. There isn't a way to avoid the prefix. You should open the htmlcov/index.html file, and navigate from there.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ned Batchelder |
