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

[Feature Request] Make pragma Comments Behave Similarly to the Ones in Python's coverage #519

Open
FloatingSunfish opened this issue Jul 29, 2021 · 0 comments

Comments

@FloatingSunfish
Copy link

Currently, # pragma: no mutate comments only affect a single line.

The # pragma: no cover comments in Python's coverage tool work on both single lines and code blocks (e.g. functions, classes, if blocks, etc).

Here is a link to the official documentation.

The way pragma comments work for code blocks is that they are added at the end of the line that begins the block:

a = my_function1()
if debug:   # pragma: no cover
    msg = "blah blah"
    log_message(msg, a)
b = my_function2()
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

No branches or pull requests

1 participant