-
-
Notifications
You must be signed in to change notification settings - Fork 11k
TST: Remove most */tests/__init__.py
#29246
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
base: main
Are you sure you want to change the base?
Conversation
I refreshed my memory on why the
So that was for |
I guess this is for testing purposes only, but in case, are you sure removing the p.s. I'm also surprised at the renaming - why rename |
My main motivation is the fact that type-checkers such as pyright currently consider these
Yea I'm also surprised that this was needed, but without it, pytest was complaining about name clashes. If you know of another way that we could work around this, I'd be happy to try that. |
That is why the |
Apparently we can also avoid name clashes by running pytest with edit: Well, it turns out that it's a classic case of "but it works on my machine"... |
x-ref: microsoft/pyright#10614 (reply in thread)
But unfortunately this does help increase the "type completeness score". Running
pyright --ignoreexternal --verifytypes numpy
(afterpip install .
) shows the following:before:
after:
So I suppose that the main advantage is that
tests
is no longer directly importableNote that this does not remove
_pyinstaller/tests/__init__.py
anddistutils/tests/__init__.py
.