Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify subprocess coverage setup #453

Closed
mih opened this issue Sep 27, 2023 · 0 comments · Fixed by #457
Closed

Simplify subprocess coverage setup #453

mih opened this issue Sep 27, 2023 · 0 comments · Fixed by #457

Comments

@mih
Copy link
Member

mih commented Sep 27, 2023

We use the setup from datalad core here.

However, it turns out that almost none of that is needed, and pytest-cov does almost everything out of the box.

See datalad/datalad-ria#6 for a demo on what is neeed for adding subprocess coverage.

One thing to keep in mind when exploring coverage capture for special remote processes: We may never be able to get full coverage for "abnormal" exits. When git-annex externally terminates a special remote process, it seems "expected" that the onexit handlers that coverage reporting relies on, do not reliably run.

mih added a commit to mih/datalad-next that referenced this issue Sep 28, 2023
The previous setup was taken from datalad-core. It comes from a time
before `pytest`. With `pytest-cov` none of this complexity should be
needed anymore.

A similar setup has been implemented as part of
datalad/datalad-ria#6

Closes datalad#453
@mih mih closed this as completed in #457 Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant