run -m cannot find module (or package) in current directory · Issue #207 · nedbat/coveragepy (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@nedbat

Description

@nedbat

Originally reported by Antony Lee (Bitbucket: anntzer, GitHub: anntzer)


The directory from which coverage was started should be added at the beginning of sys.path (or perhaps even replace the first entry of sys.path, which is the directory where coverage is installed), so that coverage run -m foo can find foo in that directory (just as python -m foo can find foo in that directory).

Perhaps this modification should be made temporary though (e.g. by fooling around in execfile.py).