-
Notifications
You must be signed in to change notification settings - Fork 253
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
Tests should be run in a clean environment #121
Comments
Good point! Did you get burned by this?
…Sent from my phone
On 9 Jan 2019, at 16:18, Thomas Robitaille ***@***.***> wrote:
Currently tests are run in the same environment that BEFORE_BUILD was run in, but it would be good to try installing the wheel into a clean environment to make sure that all the correct dependencies are installed and don't rely on BEFORE_BUILD.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Somewhat - I have to currently install a more recent version of numpy manually in the test phase (since I want to test with the most recent version, not the version used for the build). So there's a workaround, but ideally we should fix this in cibuildwheel. |
Then a |
Maybe CIBW_TEST_REQUIRES supports this already? Ask for a version that's newer than whatever your built with? |
@joerick - yes I can use |
Yep, I agree on the broader point about test environments.
I suppose the solution is to create a venv, install our new wheel in there and run the tests using that.
Aside: I've never been totally happy with the strategy of moving out of the project dir and running the tests from elsewhere to avoid picking up the module (and using the {project} keyword in the test command). If the isolated test env could improve that too somehow, that would be great.
…Sent from my phone
On 9 Jan 2019, at 23:39, Thomas Robitaille ***@***.***> wrote:
@joerick - yes I can use CIBW_TEST_REQUIRES in my case but it's more that conceptually the test and build phases should be separate to make sure that the dependencies in the package are correctly defined. For example if the fast-histogram package didn't define the numpy depdendency in install_requires, I wouldn't have noticed (so I'm just pre-empting for other packages in future).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
tox might be an option for creating different environments with different pythons and running tests separately. |
Fixed in #164, release should be soon! |
Currently tests are run in the same environment that
BEFORE_BUILD
was run in, but it would be good to try installing the wheel into a clean environment to make sure that all the correct dependencies are installed and don't rely onBEFORE_BUILD
.The text was updated successfully, but these errors were encountered: