summaryrefslogtreecommitdiff
path: root/Lib/test/test_typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r--Lib/test/test_typing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index a547fe274c..c9bfd0c7ed 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -568,6 +568,10 @@ class ProtocolTests(BaseTestCase):
self.assertIsSubclass(list, typing.Reversible)
self.assertNotIsSubclass(int, typing.Reversible)
+ def test_supports_index(self):
+ self.assertIsSubclass(int, typing.SupportsIndex)
+ self.assertNotIsSubclass(str, typing.SupportsIndex)
+
def test_protocol_instance_type_error(self):
with self.assertRaises(TypeError):
isinstance(0, typing.SupportsAbs)