-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Running tests inside namespace packages ? #2371
Comments
at first glance that is a standard python level error, please run commands like: |
I setup a new clean environment :
I first did an install with
Not exactly sure why, it might be one of these bugs : https://github.com/jonparrott/namespace-pkg-tests/blob/master/table.md However I removed and reinstall with pip :
And got it to work, for python, but not for pytest :
It seems :
|
@RonnyPfannschmidt This should be moved to discussions. |
Was about to do it but noticed the link is not there anymore. Seems like they have removed that feature: community/community#2952 (comment) 😞 (see the more recent replies) |
Since pytest only supports legacy namespace packages I'd like to bump this issue once again. Soon A minimal working example can be found here: https://github.com/woutdenolf/pytest_pep420.
|
Thanks @bluetech ! Adding this to
Run
Result
|
I am having
import
issues with namespaces packages and pytest.Something along the lines of pytest already having the namespace imported and not looking deeper into the subpackage for the actual package (while running the
AssertionRewritingHook:find_modules
method inrewrite.py
)I am currently trying to reproduce the issue on a minimal example, so I made https://github.com/asmodehn/python_ns_pkgs.
But it seems the test on these installed packages are not even collected...
Envrionment setup :
The things I attempted with pytest so far :
then I realize I might have been using an old pytest version, so I ran these :
But still no success...
So
Thanks to shed some light on these...
The text was updated successfully, but these errors were encountered: