Using a standard library class makes this test difficult to maintain
as other tests and other parts of the stdlib may create subclasses,
which may still be alive when this test runs depending on GC timing.
(cherry picked from commit
08a467b537b3d9b499d060697e79b3950374ab0f)
.. doctest::
- >>> int.__subclasses__()
- [<class 'bool'>, <enum 'IntEnum'>, <flag 'IntFlag'>, <class 're._constants._NamedIntConstant'>]
+ >>> class A: pass
+ >>> class B(A): pass
+ >>> A.__subclasses__()
+ [<class 'B'>]
Class instances
---------------