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

Fix IntArray test #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

minrk
Copy link
Contributor

@minrk minrk commented Mar 29, 2019

dtype is a constructor arg, not a metadata tag

I think it was a coincidence that the early bad_value tests failed with old numpy. They pass as dtype=object with recent numpy. Test is updated to test integer arrays now.

closes #31

dtype is a constructor arg, not a metadata tag

I think it was a coincidence that the early bad_value tests failed with old numpy.
They pass as dtype=object with recent numpy
@minrk minrk changed the title Fix IntArrayText Fix IntArray test Mar 29, 2019
@bnavigator
Copy link

np.int has been removed from numpy 1.24. This should be plain 'int' now.

[   25s] ============================= test session starts ==============================
[   25s] platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 -- /usr/bin/python3.8
[   25s] cachedir: .pytest_cache
[   25s] rootdir: /home/abuild/rpmbuild/BUILD/traittypes-0.2.1
[   26s] collecting ... collected 3 items / 1 error
[   26s] 
[   26s] ==================================== ERRORS ====================================
[   26s] _____________ ERROR collecting traittypes/tests/test_traittypes.py _____________
[   26s] traittypes/tests/test_traittypes.py:19: in <module>
[   26s]     class IntArrayTrait(HasTraits):
[   26s] traittypes/tests/test_traittypes.py:20: in IntArrayTrait
[   26s]     value = Array().tag(dtype=np.int)
[   26s] /usr/lib64/python3.8/site-packages/numpy/__init__.py:284: in __getattr__
[   26s]     raise AttributeError("module {!r} has no attribute "
[   26s] E   AttributeError: module 'numpy' has no attribute 'int'
[   26s] =============================== warnings summary ===============================

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Jan 8, 2023
https://build.opensuse.org/request/show/1056815
by user bnavigator + dimstar_suse
- Add python-fix-nptypes.patch gh#jupyter-widgets/traittypes#32
- Clean specfile, no files catachall
- Use PEP517 build (forwarded request 1056814 from bnavigator)
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 this pull request may close these issues.

test_bad_values (traittypes.tests.test_traittypes.TestIntArray) fails for openSUSE
2 participants