-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
misbehavior in run --source (?) #328
Comments
Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor) This happens because the module's name is The unexpected thing is that the module-name as --source sees it is not always equal to the module-name as -m sees it. I should have thought of this much earlier, but didn't. I think this is surprising enough that I'd like to make it work as expected. Is there any way to calculate the "real" name of a |
Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor) Proof of concept for my solution idea here: https://bitbucket.org/ned/coveragepy/pull-request/41/make-source-and-m-play-nice-together/diff |
Fixed in 1869e6b940e4 (bb) |
Originally reported by Anonymous
The below script reproduces the problem.
In summary, I expect that when the argument to -m and --source are equal, I should never see the code run, and get a warning "module x was never imported", but this is not the current behavior.
The text was updated successfully, but these errors were encountered: