-
Notifications
You must be signed in to change notification settings - Fork 153
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
2.10.70: pytest fails because it cannot find tests
#1074
Comments
I think this might be related to this.: would you like to try with pre version 8 pytest? |
Sorry but I'm only interested latest pytest 8.x. |
The problem is that due to the changes of pytest on how tests get discovered in version 8 constructs tests don't work anymore. i belive this is the best solution with little changes short term.:
works for me with pytest 8.1.1 |
Issue only is that other modules does not need to altering $PYTHONPATH. Just build updated |
There are breaking changes between pytest 7.x.y and 8.u.v and we have 2 ways to deal with those at the moment. (modifying the pythonpath, and using 7.x.y) If you want to have a deeper insight, or research a more elegant solution, I think you would be better off discussing this with pytest (https://github.com/pytest-dev/pytest). Surely other projects have not been affected by these breaking changes without a depreciation period, and others might have already adapted to them... Your best options are probably to either live with one of the solutions suggested, or make a PR with a solution you like and lobby for it. |
I understand .. however you can find plenty of examples with modules test suites which are OK with pytest 7.x and 8.x. |
https://github.com/franzhaas/construct/tree/speedOptimisations the commit f4a7867 |
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
List of installed modules in build env:
Please let me know if you need more details or want me to perform some diagnostics.
The text was updated successfully, but these errors were encountered: