Skip to content

Fix IntArray test #32

Open
minrk wants to merge 1 commit into
jupyter-widgets:masterfrom
minrk:fix-int-array
Open

Fix IntArray test #32
minrk wants to merge 1 commit into
jupyter-widgets:masterfrom
minrk:fix-int-array

Conversation

@minrk
Copy link
Copy Markdown
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
Copy Markdown

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