I have this situation / structure:
my_project/ setup.py my_pkg/ my_pkg/__init__.py # obviously my_pkg/a my_pkg/a/__init__.py my_pkg/a/b.py my_pkg/c.py etc...
(actually my_pkg is deeper below my_project, under a kind of "src" directory but this doesn't change anything)
I'm trying to get coverage to output / generate html with "package names" for my_pkg ; that is I'm trying to get:
Name Stmts Miss Cove my_pkg : 1234 234 30% my_pkg.a : etc xx% lines my_pkg.a.b : etc # etc..
but if I normally pip install my package, then what I get is:
Name Stmts Miss Cove /abs_path_to_python_site_package/my_pkg/__init__.py : 1234 234 30% /abs_path_to_python_site_package/my_pkg/a.py
that is : how to get the package/module name instead of (absolute) file paths in the html report, as I ?
at the best I can eventually get relative paths to the files in case I test "in place" but isn't it possible to get the package/module (dotted) names instead ?
I searched the docs, stackoverflow, googled anything I could but I don't find.