-
-
Notifications
You must be signed in to change notification settings - Fork 3k
mypy attrs tests fail because attrs 18.2.0 was just released #5553
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
Comments
No, this will make tests much slower. We need to find a way to use fixtures in this case (maybe there is a bug in test runner?). |
This is actually high priority (assuming your diagnosis is right). |
The quick workaround is:
|
Thanks! I am working on a more permanent solution now. I think we can just skip installed stuff if |
Here is what I propose #5554 |
Uh oh!
There was an error while loading. Please reload this page.
This morning I tried running the unit tests in a fresh venv with a clean master. All the attrs test failed.
After much looking around I discovered that:
A) The mypy test-requirements.txt installs the
attrs
package (because it's used by some pytest module)B) Attrs 18.2.0 "now ships its own PEP 484 type hints. Together with mypy’s attrs plugin, you’ve got all you need for writing statically typed code in both Python 2 and 3!"
C) The mypy tests load the real stubs instead of the ones instead of the ones in
lib-stub
.This causes almost every attr test to fail with "Could not find builtin symbol 'dict'. (Are you running a test case? If so, make sure to include a fixture that defines this symbol.)"
I could go into every test and add the correct fixtures but should the tests be loading the real stubs?
cc: @hynek
The text was updated successfully, but these errors were encountered: