diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2023-04-25 12:59:04 +0200 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2023-04-25 13:32:51 +0200 |
commit | 5019e0abc3eda9bbfbead97b08b4302da2c31437 (patch) | |
tree | cfd76b43d837c13a82f81aa11cfc113f3cd8e97d | |
parent | 61610e74340a4a22f2782274600ae34bd882b929 (diff) | |
download | numpy-5019e0abc3eda9bbfbead97b08b4302da2c31437.tar.gz |
TST: Skip test on older Python versions which use `__name__`
-rw-r--r-- | numpy/core/tests/test_overrides.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_overrides.py b/numpy/core/tests/test_overrides.py index 65155b207..5924358ea 100644 --- a/numpy/core/tests/test_overrides.py +++ b/numpy/core/tests/test_overrides.py @@ -389,6 +389,12 @@ class TestArrayFunctionImplementation: func(bad_arg=3) raise AssertionError("must fail") except TypeError as exc: + if exc.args[0].startswith("_dispatcher"): + # We replace the qualname currently, but it used `__name__` + # (relevant functions have the same name and qualname anyway) + pytest.skip("Python version is not using __qualname__ for " + "TypeError formatting.") + assert exc.args == expected_exception.args @pytest.mark.parametrize("value", [234, "this func is not replaced"]) |