When I run coverage run -m pytest tests/ followed by coverage report in the terminal
I get the following error:
No source for code: '/private/var/.../_remote_module_non_scriptable.py'.
It seems like a similar issue has been resolved already, however I do not understand the solution.
Can a friendly soul help me understand what might be the cause of the problem?
coverage xml -i doesn't work for me.
I found out that the <tmpdir>/_remote_module_non_scriptable.py is generated by pytorch.
Solution: add to pyproject.toml
[tool.coverage.run]
omit = [
# omit pytorch-generated files in /tmp
"/tmp/*",
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With