TST, MAINT: Lots of new tests for fromnumeric.py#7027
TST, MAINT: Lots of new tests for fromnumeric.py#7027charris merged 1 commit intonumpy:masterfrom gfyoung:test_fromnumeric_expand
Conversation
|
Please don't rebase. |
|
PR is no longer WIP. Travis + Appveyor are both passing. Should be good to merge now. |
numpy/core/tests/test_multiarray.py
Outdated
There was a problem hiding this comment.
Should keep the first version in order to test the funtion, not the method.
|
Looks generally good, but the common mistake is to substitute methods for functions. The two aren't the same despite the apparent redundancy. The methods should actually be tested in the |
|
@charris : Changes made and Travis / Appveyor are happy. |
There was a problem hiding this comment.
Why remove this file? fromnumeric.py is a package containing a number of functions. put is also a function implemented in fromnumeric.py.
There was a problem hiding this comment.
I added that file myself from #7000 that served as a stopgap measure to test that put would not accept non-ndarray args. Also, a lot of the tests of fromnumeric.py functions are located elsewhere in the tests.
There was a problem hiding this comment.
Hmm, at some point we need to reorganize numpy/core, but I suppose that is for another day.
|
I think you need to check carefully where functions/methods etc are defined. The easy way to check functions in ipython is to use the |
|
If you look at the functions defined in My original intention was to write an entire |
TST, MAINT: Lots of new tests for fromnumeric.py
|
Thanks @gfyoung . |
Follow-up from #7000 in which I found there seemed to be a gap in testing for the
numpy/numpy/core/fromnumeric.pyfile. This PR improves the coverage on the methods defined in that file.