-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
On Python 3, importing a .pyc with no .py fails in the assert rewriter #2038
Labels
type: bug
problem that needs to be addressed
type: infrastructure
improvement to development/releases/CI structure
Comments
wow, that one is a nasty edge-case |
RonnyPfannschmidt
added
type: bug
problem that needs to be addressed
type: infrastructure
improvement to development/releases/CI structure
labels
Nov 1, 2016
I'm curious, why was this labeled as "infrastructure"? Mind you I have no idea what's the problem. 😄 |
FWIW I can reproduce the issue on Windows, thanks @nedbat for packaging it so neatly:
|
Is there a way to disable assert rewriting for just one test? |
Not AFAIK... |
And sadly I can't think of a workaround to recommend either. |
4 tasks
Turns out it wasn't hard to fix: #2070 |
RonnyPfannschmidt
added a commit
that referenced
this issue
Nov 22, 2016
Don't fail if imp can't find the source for a .pyc file. #2038
This was referenced Dec 5, 2016
This was referenced Feb 21, 2018
This was referenced Mar 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type: bug
problem that needs to be addressed
type: infrastructure
improvement to development/releases/CI structure
Pytest 3.0.3, Mac OS/X
To reproduce: get commit 694165cbea4c of coverage.py: https://bitbucket.org/ned/coveragepy/get/694165cbea4c.zip
This is with Python 3.5, py34 or py36 will also fail, with slightly different stack traces.
This test is designed to test how coverage.py handles missing .py files, so it is intentional that there is a .pyc with no .py file.
The text was updated successfully, but these errors were encountered: