summaryrefslogtreecommitdiff
path: root/tests/test_map.py
diff options
context:
space:
mode:
authorAnton Agestam <git@antonagestam.se>2019-10-03 23:03:55 +0200
committerYury Selivanov <yury@magic.io>2019-10-03 17:03:55 -0400
commitd7920a9f6a256ac5e8903b5c39ae290109251e29 (patch)
tree5483d226203fc5699112ae29c951b9e1fc861b83 /tests/test_map.py
parent1a51a34154654285e017e6006d16c03cbee92637 (diff)
downloadimmutables-d7920a9f6a256ac5e8903b5c39ae290109251e29.tar.gz
immutables-d7920a9f6a256ac5e8903b5c39ae290109251e29.zip
Add typing information (#13)
Diffstat (limited to 'tests/test_map.py')
-rw-r--r--tests/test_map.py5
1 files changed, 5 insertions, 0 deletions
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):