-
Notifications
You must be signed in to change notification settings - Fork 19
fix the failing workflow #75
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
Conversation
Ok after hours of investigation, the error is only happening specifically when running pytest (not unittest, which is working fine) on linux (not other platforms) when using only regular pip install (didn't install with -e before). the error could be removed by instead of using pip install -e ., as it will generate So I think the best move is to use -e in the workflow for this package. |
Thanks for the hard work on this. This makes me pretty uncomfortable. Doesn't it mean if someone pip installs it, it won't run on linux? Let's go with this workaround for now, but write an issue to revisit this and fix it properly. Could you also paste the failed tests trace into the issue so that we have a head-start when we do look at it? Thanks, S |
In fact after further reading and testing, I think I know the reason now. When simply running pytest, it will automatically find tests from the current dir (which would normally be something like When we pip install , pip will compiled cpython extensions. Depend on installation mode, the cpython extensions will be in either So the problem is when we Testing it in another way, when I In fact this doesn't limit to linux, I realize this is also happening on Mac. However I was not aware of cpython files at the beginning so there always exists a cpython in my Another thing I was wrong was cpython files are not in tests dir but pdffit2 dir. This is how modules can run import @sbillinge so in short, when the package involve with cpython extensions, we should run pytest at the directory where the package is actually built. So if -e install then pytest is fine as both are in I think this is only a pytest thing, so fortunately it might not be that worrying... |
good sleuthing. I think this means that for packages with c in them we may need a |
No description provided.