diff options
Diffstat (limited to 'Lib/test/test_abc.py')
-rw-r--r-- | Lib/test/test_abc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_abc.py b/Lib/test/test_abc.py index 884dd32..80b0123 100644 --- a/Lib/test/test_abc.py +++ b/Lib/test/test_abc.py @@ -81,6 +81,16 @@ class TestABC(unittest.TestCase): self.assertEqual(issubclass(C, A), True) self.assertEqual(isinstance(c, A), True) + def test_isinstance_invalidation(self): + class A(metaclass=abc.ABCMeta): + pass + class B: + pass + b = B() + self.assertEqual(isinstance(b, A), False) + A.register(B) + self.assertEqual(isinstance(b, A), True) + def test_registration_builtins(self): class A(metaclass=abc.ABCMeta): pass |