Replies: 1 comment 1 reply
-
Hi @igo95862, thanks for your question. I'm not actually sure about my answer here, because there's multiple unusual things in your setup. A few thoughts:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I already use
meson test
in my project to run python unittests. However, I do it a little bit backwards.In the test folder every python test file has a
if __name__ == "__main__"
guard that runs theunittest.main()
if the file is main script file. In meson I add a test for each file and run it with the python installation.The magick that sets up the python code is the
test_env
environment.The issue is I am not actually using
install_sources
to add the python files. Instead I use acustom_target
with my own bytecode compiler. I was looking in to switching toinstall_sources
but it seems to be impossible to replicate my current setup.install_sources
does not actually copy the python files to the build directory which makes it impossible to have a singlePYTHONPATH
to load the python package for the unit tests. Not sure how well using multiple paths inPYTHONPATH
where one path is the source directory and the other one is build directory would work when there are both python files and extension modules.Beta Was this translation helpful? Give feedback.
All reactions