-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 from wheel package with --pyargs ignores custom arguments #3517
Comments
those need to be an actual pytest plugin in that case - early conftests are not discovered in packages |
@RonnyPfannschmidt Thx for saving me time otherwise wasted for unsuccessful exploration 🙂 I know about pytest-dev/cookiecutter-pytest-plugin which creates a structure like this (only files relevant for this issue shown):
If I consider the exemplary test only package structure (inclusive their utilities, ideally importable by other packages/pytest-plugins, etc.):
In essence: Is there something preventing me from structuring the package like following for a "easy" and a "full-blown" case? Easy case with separate fixtures and utils:
Full-blown case with separate fixtures and utils:
|
Closing as inactive. |
I created a test only package like described here (wheel, tests deployed via
data_package=
). I noticed that if the tests are run on Ubuntu withpytest --pyargs <package-name> <custom-arguments>
the tests are detected and run but they fail during setup because the custom command line arguments are not recognized fromconftest.py
. I found a workaround for this issue. Is this the recommended way to handle this my use case (deploy test only package with custom command line arguments)?The text was updated successfully, but these errors were encountered: