mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Fix #16832 - expose cache validity checking support in ABCMeta
This commit is contained in:
parent
b961955e95
commit
eadd8cf507
3 changed files with 34 additions and 0 deletions
|
|
@ -329,7 +329,10 @@ class TestABC(unittest.TestCase):
|
|||
b = B()
|
||||
self.assertFalse(isinstance(b, A))
|
||||
self.assertFalse(isinstance(b, (A,)))
|
||||
token_old = abc.get_cache_token()
|
||||
A.register(B)
|
||||
token_new = abc.get_cache_token()
|
||||
self.assertNotEqual(token_old, token_new)
|
||||
self.assertTrue(isinstance(b, A))
|
||||
self.assertTrue(isinstance(b, (A,)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue