We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running coverage run; coverage xml on a Sanic app causes warnings about unparseable code that seem related to code generated by Sanic.
coverage run; coverage xml
As an example:
warning: "No source for code: _run_response_middleware (couldnt-parse)
A full example is provided here:
https://github.com/rogthefrog/sanic-coverage-example
Warnings should not be issued against code that doesn't exist.
Sanic CLI
MacOS Monterey 12.4
22.12.0
This is a follow-up to #2345 per request from @ahopkins
Thank you.
The text was updated successfully, but these errors were encountered:
Thanks for putting together the example. Makes it much easier to help you. ❤️
I would suggest adding this:
from os import environ ... if "COVERAGE_RUN" in environ: app.config.TOUCHUP = False
I confirmed with your test repo that it works.
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
Describe the bug
Running
coverage run; coverage xml
on a Sanic app causes warnings about unparseable code that seem related to code generated by Sanic.As an example:
warning: "No source for code: _run_response_middleware (couldnt-parse)
Code snippet
A full example is provided here:
https://github.com/rogthefrog/sanic-coverage-example
Expected Behavior
Warnings should not be issued against code that doesn't exist.
How do you run Sanic?
Sanic CLI
Operating System
MacOS Monterey 12.4
Sanic Version
22.12.0
Additional context
This is a follow-up to #2345 per request from @ahopkins
Thank you.
The text was updated successfully, but these errors were encountered: