Q: Running pytest on module inside site-packages.zip I am trying to run tests using pytest inside a MacOS X application built using py2app. By default, py2app stores all the modules inside a site-packages.zip file in the application rather than a site-packages directory, and the .py files are missing (only .pyc files present). My first reflect was that if it would be possible to test pytest to run on a specific module (but not specifying it by path) it might work, but then I realized that it might not be possible to run pytest without having access to the source files for the tests?
My next reflex was to try and run the tests using a copy of the tests that could be stored in the app, but the issue is that the existing tests use relative imports, so it isn't possible to use them to test a separate installed module without a lot of work to change them to use absolute imports.
Does anyone have any suggestions for dealing with this kind of situation?
