diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-04-28 12:58:49 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-04-28 13:25:29 +0200 |
commit | 3b60effc5d1cb1e13e8aa8d9dabf228c68683fdb (patch) | |
tree | b2a7cd287bd50e1984c994bf43d7e87ab25a0df2 /numpy | |
parent | 7a5b52e0332629553d0cc2598567162a9398c5f0 (diff) | |
download | numpy-3b60effc5d1cb1e13e8aa8d9dabf228c68683fdb.tar.gz |
TST: XFail richcompare subclass test on PyPy
PyPy does not seem to replace tp_richcompare in the "C wrapper"
object for subclasses defining `__le__`, etc.
That is understandable, but means that we cannot (easily) figure
out that the subclass should be preferred.
In general, this is a bit of a best effort try anyway, and this
is probably simply OK. Hopefully, subclassing is rare and
comparing two _different_ subclasses even more so.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_scalarmath.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/core/tests/test_scalarmath.py b/numpy/core/tests/test_scalarmath.py index 56a7c1567..527106973 100644 --- a/numpy/core/tests/test_scalarmath.py +++ b/numpy/core/tests/test_scalarmath.py @@ -950,6 +950,9 @@ ops_with_names = [ @pytest.mark.parametrize(["__op__", "__rop__", "op", "cmp"], ops_with_names) @pytest.mark.parametrize("sctype", [np.float32, np.float64, np.longdouble]) +@pytest.mark.xfail(IS_PYPY, + reason="PyPy does not replace `tp_richcompare` for subclasses so" + "our we do not realize when deferring should be preferred.") def test_subclass_deferral(sctype, __op__, __rop__, op, cmp): """ This test covers scalar subclass deferral. Note that this is exceedingly |