-
Notifications
You must be signed in to change notification settings - Fork 784
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 rust unit tests #941
Comments
Thanks, the |
otherwise `cargo test` will fail to run see: PyO3/pyo3#941
Hi @davidhewitt, in 2020 you mentioned that you might have a resolution soon, and marked this as Completed soon after. Just wondering if there is now a best-practice solution to this problem? EDIT: I found the Testing section, and this does resolve the linker errors, but I still have to set
I am using pyenv with Python 3.12.2, installed with BTW, I don't get "weird linking errors" even with i.e. this works with
|
I think that's because by having that
I believe that the |
Not sure if this is a bug, a feature request, or me just not understanding.
I find there's generally some pure-rust glue code between whatever library I'm wrapping and the pyo3-annotated functions which python actually sees. Often there's a small number of key functions in this glue code. I'd like to unit test them from rust, rather than from python (the functionality exposed to python is sometimes too high-level to test effectively).
However, I can't run
cargo test
if there's any pyo3 code in the library. The error message is huge, but the top and tail isIt seems like it may relate to issue #99: @konstin suggested looking here and indeed I am using pyenv, although recompiling (3.8.3) with that flag enabled didn't seem to help.
The text was updated successfully, but these errors were encountered: