Skip to content

Coverage measurement fails on code containing os.exec* methods #43

Open
@nedbat

Description

@nedbat

Originally reported by Anonymous


I recently tried to measure coverage of a program that calls os.execvpe, essentially causing the process to be replaced by a different one. This did not record any coverage information at all.

The reason of course is that os.execvpe does not return, so there is no opportunity to call coverage.stop() and coverage.save() as is done if e.g. an exception is thrown. I'd suggest this method could be "monkey-patched" so that such code can be inserted before it.
(and also the other 7 os.exec* methods of course)


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexoticUnusual execution environment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions