summaryrefslogtreecommitdiff
path: root/numpy/typing
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2022-07-14 12:44:40 +0200
committerBas van Beek <43369155+BvB93@users.noreply.github.com>2022-07-14 12:44:40 +0200
commitd95c4285c4b8dbb8cf57b1ad5a887c8e924dc924 (patch)
tree8a22b4d906be4d342b22f324b34c349557312c20 /numpy/typing
parent37846563156b3ed8287fc94d6a7d107a316c5ecf (diff)
downloadnumpy-d95c4285c4b8dbb8cf57b1ad5a887c8e924dc924.tar.gz
MAINT: Do not let `_GenericAlias` wrap the underlying classes `__class__` attribute
Adapt to the 3.11b4 changes introduced in https://github.com/python/cpython/pull/93754
Diffstat (limited to 'numpy/typing')
-rw-r--r--numpy/typing/tests/test_generic_alias.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/typing/tests/test_generic_alias.py b/numpy/typing/tests/test_generic_alias.py
index 093e12109..861babd4b 100644
--- a/numpy/typing/tests/test_generic_alias.py
+++ b/numpy/typing/tests/test_generic_alias.py
@@ -120,9 +120,12 @@ class TestGenericAlias:
# and they are thus now longer equivalent
("__ne__", lambda n: n != next(iter(n)), ("beta", 1)),
- # >= beta3 stuff
+ # >= beta3
("__typing_unpacked_tuple_args__",
lambda n: n.__typing_unpacked_tuple_args__, ("beta", 3)),
+
+ # >= beta4
+ ("__class__", lambda n: n.__class__ == type(n), ("beta", 4)),
])
def test_py311_features(
self,