-
-
Notifications
You must be signed in to change notification settings - Fork 478
All coverage commands should adjust sys.path #358
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The Django coverage plugin has an issue about not being able to find settings: coveragepy/django_coverage_plugin#3
The "coverage run" command sets sys.path[0] to be the directory containing the program being run, similar to what Python itself does. This makes it possible to import Django settings.
But "coverage report" and "coverage html" do not adjust the path. They are being run from /path/to/bin/coverage.py, so the current-directory-relative settings module can't be imported.
I think sys.path should include the current directory for those commands?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working