Skip to content

Commit

Permalink
TST: Add new tests for array coercion (#16571)
Browse files Browse the repository at this point in the history
* ENH: Add traceback-skip to `assert_array_compare`

* TST: Add tests for arraycoercion

These tests have many xfails (some technically maybe not correct),
which describe in detail what will change when merging the
array-coercion changes; since all of those xfails are going
to be removed.

* TST: Add test for empty sequences

* TST: Add tests for bad self-mutating sequence inputs to np.array

These should never happen and rightly should lead to undefined
behaviour (and preferably errors), but they excercise some more
tricky code branches and should probably not crash.

* Simplify the "all scalars" logic (hardcode) and fix complex cases

* MAINT: Some cleanup, and xfail pypy

PyPy seems to have issues with int(numpy_complex), maybe because
it gives a warning during conversion (python does not define it).
So simply mark it as xfail, it should work in my branch.
Also some smaller cleanups.

* TST: Add some further test, re-add missing rational

* MAINT: Make rationals optional, because they fail some tests currently

The failures will go away, since this must again be related to
implemetning int() and float().

* Update numpy/conftest.py

* MAINT: Fix strings and use pytest.param to clean things up

* TST: Add tests for 0-D array-like input to np.array() corner-cases

* TST: Improve parameterization IDs to get better printing at -vv
  • Loading branch information
seberg committed Jun 19, 2020
1 parent e8c78e0 commit f253a7e
Show file tree
Hide file tree
Showing 3 changed files with 593 additions and 0 deletions.

0 comments on commit f253a7e

Please sign in to comment.