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

azdev test core fails: AttributeError: 'AssertionRewritingHook' object has no attribute 'find_spec' #211

Closed
jiasli opened this issue Jun 12, 2020 · 1 comment · Fixed by #246
Assignees

Comments

@jiasli
Copy link
Member

jiasli commented Jun 12, 2020

Command:

azdev test core --discover --series

It fails with error:

______________________ HelpTest.test_help_loads ______________________ 

name = 'azure.mgmt.applicationinsights.models.web_test', path = ['d:\\cli\\env38\\lib\\site-packages\\azure\\mgmt\\applicationinsights\\models'], target = None

>   ???
E   AttributeError: 'AssertionRewritingHook' object has no attribute 'find_spec'

<frozen importlib._bootstrap>:908: AttributeError

This seems to be related to pytest-dev/pytest#1888.

@jiasli jiasli changed the title azdev test core fails azdev test core fails: AttributeError: 'AssertionRewritingHook' object has no attribute 'find_spec' Jun 12, 2020
@jiasli
Copy link
Member Author

jiasli commented Jun 12, 2020

This issue only happens on Windows with pytest 4.4.2.

> pip list | sls pytest

pytest                                4.4.2
pytest-forked                         1.1.3
pytest-xdist                          1.31.0

It is gone after upgrading pytest to 5.4.3.

> pip list | sls pytest

pytest                                5.4.3
pytest-forked                         1.1.3
pytest-xdist                          1.31.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants