-
Notifications
You must be signed in to change notification settings - Fork 275
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 pytest fails due to path issues: No such file or directory: 'generated_data/ed25519_metadata' #2745
Comments
Hi, thanks for report, We don't actually use pytest, just unittest (pytest might still run the exact same tests but there's no advantage to using it in this test suite). The four warnings you see are minor incompatibilities with pytest and our suite. In practice the test automation actually executes The error you hit seems to relate to our test automation always running so that working directory is A workaround for you might be to run The specific issues we should fix:
|
Thanks for ideas! Debian build system has some magic to "guess" the self-test system to use, and it may need help. Hard-coding whatever commands you believe are the ones to use for self-testing is fine. But I can't get any sequence of commands to work. Just using
It is the same tests/ CWD problem, isn't it? Using
It seems to be the namespace-issue that is mentioned here: https://github.com/theupdateframework/python-tuf/blob/develop/pyproject.toml#L73
Finally I tried to simply use
So I'm back to the CWD issue. If you have any more ideas, let me know! /Simon |
First and last issue there are indeed the CWD issue. Second failure implies the test suite expects the tests to be installed -- this is is a unusual but I guess happens when a python project is installed with I guess in your case you have "installed" the debian package that you're testing and this of course does not and should not contain tests... I think this is a test suite bug, or at least it should work in your case as well. I'll take a look this week. |
Note to myself:
Actually this makes some sense as a side effect of the original CWD issue: if CWD was root source dir then I think |
I think the issues you found will be fixed in #2749 (apart from pytest support: it might work but I'm not planning to test for that).
Feel free to test the branch or wait until merge -- I'm happy to do further fixes if they're needed either way. |
Hi! I'm working on packaging of Python-TUF for Debian and ran into this self-check failure which I can reproduce in a basic git checkout of d805a81 which is master per 2024-12-06.
Shouldn't running 'pytest' work automatically? Is there some path confusion here, or why does this fail?
Thanks,
Simon
The text was updated successfully, but these errors were encountered: