0

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?

mckris
  • 11
  • 1
  • There are several simple and concrete suggestions in that post. (1) Delete all the .pyc files, (2) Do `nosetests --with-coverage --cover-erase` to accomplish the same thing. (3) Do `coverage xml -i`. Have you done any of those? – Tim Roberts Jul 31 '23 at 21:37
  • Hi @TimRoberts ,`coverage xml -i` worked for me. Generally, the `-i` just skipped the files it failed on (in my case the _remote_module_non_scriptable.py), so the prettier output `coverage report -i` also worked. Thanks. – mckris Aug 01 '23 at 08:52

0 Answers0