pony
pony copied to clipboard
Compiled query code uses the source as the filename, confusing tools
Coverage.py has an issue about phantom code when using PonyORM: https://github.com/nedbat/coveragepy/issues/1136
The problem arises because of this line:
code = compile(src, src, 'eval')
This compiles src
, but uses src
as the filename also. This causes coverage.py to think there is a file with that name.
A common convention for synthetic filenames is to use angle brackets, and to indicate something about the origin. I can make a pull request to update this line if that's OK.
#594 is a simple fix.