From d7920a9f6a256ac5e8903b5c39ae290109251e29 Mon Sep 17 00:00:00 2001 From: Anton Agestam Date: Thu, 3 Oct 2019 23:03:55 +0200 Subject: Add typing information (#13) --- tests/test_map.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test_map.py') diff --git a/tests/test_map.py b/tests/test_map.py index a99b856..8d629f8 100644 --- a/tests/test_map.py +++ b/tests/test_map.py @@ -2,6 +2,7 @@ import collections.abc import gc import pickle import random +import sys import unittest import weakref @@ -1296,6 +1297,10 @@ class BaseMapTest: with self.assertRaisesRegex(TypeError, "can't pickle"): pickle.dumps(h.mutate()) + @unittest.skipIf(sys.version_info < (3, 7, 0), "__class_getitem__ is not available") + def test_map_is_subscriptable(self): + self.assertIs(self.Map[int, str], self.Map) + class PyMapTest(BaseMapTest, unittest.TestCase): -- cgit v1.2.3