All coverage commands should adjust sys.path

Issue #358 resolved
Ned Batchelder repo owner created an issue

The Django coverage plugin has an issue about not being able to find settings:

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/, so the current-directory-relative settings module can't be imported.

I think sys.path should include the current directory for those commands?

Comments (2)

  1. Log in to comment