Skip to content
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

AttributeError on relative import #58

Closed
pytestbot opened this issue Jun 28, 2011 · 1 comment
Closed

AttributeError on relative import #58

pytestbot opened this issue Jun 28, 2011 · 1 comment
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Jason R. Coombs (BitBucket: jaraco, GitHub: jaraco)


It appears that a relative import breaks test discovery during assertion rewrite. The error is:

_pytest\assertion\rewrite.py:113: in run
>                 item.identifier != "__future__"):
E   AttributeError: 'ImportFrom' object has no attribute 'identifier'

I'm attaching a package which if tested under 2.1.0.dev4 reports an error but under 2.0.3 completes the test naturally.


@pytestbot
Copy link
Contributor Author

Original comment by Benjamin Peterson (BitBucket: gutworth, GitHub: gutworth):


fix the rewriter on relative imports (fixes #58)

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
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
Projects
None yet
Development

No branches or pull requests

1 participant