diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2017-02-24 17:28:26 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-02-24 17:28:26 (GMT) |
commit | 365cb5bb9069273e6970c9d5d17ee2fe5003e7ac (patch) | |
tree | ac9bb9c622396060ccb9ee1d9d36ef344c98f506 /Lib/test/test_typing.py | |
parent | 6059ce45aa96f52fa0150e68ea655fbfdc25609a (diff) | |
download | cpython-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.zip cpython-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.tar.gz cpython-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.tar.bz2 |
bpo-28556: Fix regression that sneaked into recent typing updates (GH-270)
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r-- | Lib/test/test_typing.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 3a82b59..f0070ec 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -701,6 +701,14 @@ class GenericTests(BaseTestCase): self.assertEqual(D.x, 'from derived x') self.assertEqual(D[str].z, 'from derived z') + def test_abc_registry_kept(self): + T = TypeVar('T') + class C(Generic[T]): ... + C.register(int) + self.assertIsInstance(1, C) + C[int] + self.assertIsInstance(1, C) + def test_false_subclasses(self): class MyMapping(MutableMapping[str, str]): pass self.assertNotIsInstance({}, MyMapping) |