add extra test test issubclass on general type
@@ -49,6 +49,13 @@ assert issubclass(AlwaysSubClass, AlwaysSubClass)
assert issubclass(InheritedAlwaysSubClass, AlwaysSubClass)
assert issubclass(AlwaysSubClass, InheritedAlwaysSubClass)
+class GenericInstance:
+ def __subclasscheck__(self, _):
+ return True
+
+assert issubclass(A, GenericInstance())
+assert issubclass(list, GenericInstance())
+assert issubclass([], GenericInstance())
class MCAVirtualSubClass(type):
def __subclasscheck__(self, subclass):
