New issue 675: Provide a way for pytester to run coverage on plugins
https://bitbucket.org/hpk42/pytest/issue/675/provide-a-way-for-pytester-to-run-coverage

David MacIver:

Scenario: I am writing a pytest plugin. I want to get coverage information on 
my plugin's execution.

Unfortunately right now this is hard. The problem is that because the plugin is 
run in a subprocess, it's not actually included in the coverage run, so all the 
code in my plugin reports as uncovered even if it's actually run.

To fix this right now I have to go through a bit of a song and dance to get 
coverage to automatically execute on all python subprocesses using a 
sitecustomize file or a .pth file, neither of which are ideal (they're quite 
hard to set up in my CI environment). It would be really helpful if I could 
configure pytester with a hook to execute before loading python so that 
coverage would be provided for the subprocesses as well.


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to