-
-
Notifications
You must be signed in to change notification settings - Fork 448
Coverage thinks there are additional files with Pony ORM queries #1136
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
Comments
@jpyams Thanks for the details, but I think there's a step missing. I'm sorry, I've never used Pony. When I run your program, I get this:
|
That's correct, sorry for the confusion, I didn't want to clutter the issue with error output. The tests fail (since this is minimum reproduceable). After running the tests, run
And that gives the rest of the output that shows the file, app.py, and an extra 'user' file which doesn't exist. Changing the name of the variable in the |
Ah, OK! Well, PonyORM does something very strange: it compiles code at runtime to evaluate queries, which isn't the odd part. The odd part is that it does it like this:
Which means it compiles your expression ( If I change app.py to this:
then
I'm going to write an issue and maybe a pull request for Pony. |
A fix for Pony: ponyorm/pony#594 |
@jpyams In the meantime, |
Thank you very much! |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When a Pony ORM query is run by the test code, Coverage thinks that one of the query parameters is another file being tested.
To Reproduce
coverage debug sys
is helpful.pip freeze
is helpful.Expected behavior
Expected output:
Additional context
This bug prevents the coverage reports from showing the source code and line-by-line breakdown of coverage in the XML report.
Trying variations of Pony's
select()
did not affect the output.The text was updated successfully, but these errors were encountered: