-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Test failure: test_typed_pkg #4883
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
I cannot seem to repro this on either Arch or Ubuntu 17.10. This failure happens if it is finding the stub package before the typed package. Could you give the output of |
Maybe checking the source could help? It looks like a simple confusion
between list and tuple.
|
One package has the return type |
Additionally, in this specific case, based on the check being run, and the output, I can surmise that there is |
So maybe it's a race between different threads/subprocesses running tests?
|
All of the package install/uninstall happen in a single test case so that shouldn't happen. I designed the test case intentionally to avoid race conditions. |
Just a random idea: Maybe this is outdated info, but my instinct was always that |
Pip doesn't always remove everything for egg installations AIUI. However, for packages installed by pip, it should remove mostly everything. One thing it absolutely removes is the package directory, so I don't think it is an issue. |
It also doesn't uninstall dependencies.
…On Tue, Apr 10, 2018, 19:51 Ethan Smith ***@***.***> wrote:
Pip doesn't always remove everything for egg installations AIUI. However,
for packages installed by pip, it should remove mostly everything. One
thing it absolutely removes is the package directory, so I don't think it
is an issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4883 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACwrMhFOtSKOLc1pYrYpJYPTqxyKiqdlks5tnW-ugaJpZM4TOlOC>
.
|
I just ran the test on my friends Mac in a virtualenv and this test case did not fail... @gvanrossum and @dmoisset since you two have been able to hit this bug, could you give me some information?
Yes this is true, fortunately for my sanity, these test packages have no dependencies :) |
@ethanhs this is my output:
I don't have mypy installed in my virtualenv, I'm just running the tests from the checked out repo, I'm not sure if that might be relevant. |
I can still repro it, both on master and on release-0.590, using my Python 3.6.5-based venv.
(Note that the mypy refers to the mypy package in the current directory.) |
I can also repro on master on my Mac.
|
So I had typedpkg and typedpkg-stubs installed in my non-venv Python 3.6.5 site-packages. No idea how that happened, but there it was. Somehow this didn't show up in the above list but it did when I deactivated the venv:
So I uninstalled these, re-activated the venv, ran the test again, and it still failed, and after deactivating the venv, typedpkg and typedpkg-stubs were there again, in the "root" python3.6! |
Since I don't have pytest installed in my root Python 3.6, I can't test with that, but at this point it does look like something funky's going on with my venv or with my root Python or with the relationship between the two. Note that my root Python 3.6 lives in |
That's a great find! I looked a bit more and found that in this code:
The So it looks like we need a better way to figure out whether we're in a virtualenv, or perhaps the test should just always create a new virtualenv for itself. |
Thanks for the fix, I can confirm this has been fixed in Ubuntu too |
I'm running mypy tests from master ( af7e834 ) with python 3.6.2; When running tests I get a failure at
test_typed_package
The text was updated successfully, but these errors were encountered: