Description
Originally reported by: David MacIver (BitBucket: david_maciver_, GitHub: 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.