Skip to content
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

Closed
astrofrog opened this issue Jan 9, 2019 · 8 comments
Closed

Tests should be run in a clean environment #121

astrofrog opened this issue Jan 9, 2019 · 8 comments

Comments

@astrofrog
Copy link
Contributor

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.

@joerick
Copy link
Contributor

joerick commented Jan 9, 2019 via email

@astrofrog
Copy link
Contributor Author

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.

@YannickJadoul
Copy link
Member

Then a CIBW_BEFORE_TEST would also be nice to have? (Maybe even defaulting to CIBW_BEFORE_BUILD for backwards compatibility?)

@joerick
Copy link
Contributor

joerick commented Jan 9, 2019

Maybe CIBW_TEST_REQUIRES supports this already? Ask for a version that's newer than whatever your built with?

@astrofrog
Copy link
Contributor Author

@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).

@joerick
Copy link
Contributor

joerick commented Jan 10, 2019 via email

@illume
Copy link

illume commented Jan 23, 2019

tox might be an option for creating different environments with different pythons and running tests separately.

@joerick
Copy link
Contributor

joerick commented Nov 4, 2019

Fixed in #164, release should be soon!

@joerick joerick closed this as completed Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants