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

Some tests require numpy and fail if not present #4529

Closed
bnavigator opened this issue Feb 21, 2021 · 1 comment · Fixed by #4563
Closed

Some tests require numpy and fail if not present #4529

bnavigator opened this issue Feb 21, 2021 · 1 comment · Fixed by #4563

Comments

@bnavigator
Copy link
Contributor

For reason's briefly discussed in dask/dask#7170 (comment), openSUSE does not have numpy for Python 3.6 in the Tumbleweed distribution anymore. At the same time, we need to have a working test suite to make sure that the built package works (without numpy functionality of course.)

Most tests of distributed involving (runtime optional) numpy are already skipped automatically if numpy is not present. But there are some ERRORs and FAILs:

[  150s] FAILED distributed/tests/test_client.py::test_turn_off_pickle[True] - ModuleN...
[  150s] FAILED distributed/tests/test_client.py::test_turn_off_pickle[False] - Module...
[  150s] FAILED distributed/tests/test_client.py::test_de_serialization - ModuleNotFou...
[  150s] FAILED distributed/tests/test_client.py::test_de_serialization_none - ModuleN...
[  150s] FAILED distributed/tests/test_pubsub.py::test_speed - ModuleNotFoundError: No...
[  150s] ERROR distributed/tests/test_nanny.py
[  150s] ERROR distributed/tests/test_utils.py

I am using this ad-hoc patch right now. It might need some polishing to meet your code standards:

importorskip-numpy-tests.patch.txt

@jrbourbeau
Copy link
Member

Thanks for reporting @bnavigator! Looking at a few of the tests listed above, using np = pytest.importorskip("numpy") instead of import numpy as np will ensure we automatically skip tests when NumPy isn't installed. Feel free to submit your current patch as a PR if you'd like (though no obligation)

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.

2 participants