summaryrefslogtreecommitdiff
path: root/tests/test_map.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-05-01 11:15:20 -0400
committerYury Selivanov <yury@magic.io>2018-05-01 11:15:20 -0400
commit4d966a1cf9acb21c9f71f2a630da11e4ac848502 (patch)
tree19f318c74eab3d2a357c2a789542b6d1fdeb6898 /tests/test_map.py
parent771954f43c70d3ba6546fafcaec40ba59a7c1d44 (diff)
downloadimmutables-4d966a1cf9acb21c9f71f2a630da11e4ac848502.tar.gz
immutables-4d966a1cf9acb21c9f71f2a630da11e4ac848502.zip
Reject keyword and positional arguments in __new__. Fixes #2.
Diffstat (limited to 'tests/test_map.py')
-rw-r--r--tests/test_map.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_map.py b/tests/test_map.py
index 660f742..fe2a131 100644
--- a/tests/test_map.py
+++ b/tests/test_map.py
@@ -93,6 +93,13 @@ class BaseMapTest:
Map = None
+ def test_init_no_args(self):
+ with self.assertRaisesRegex(TypeError, 'positional argument'):
+ self.Map(dict(a=1))
+
+ with self.assertRaisesRegex(TypeError, 'keyword argument'):
+ self.Map(a=1)
+
def test_hashkey_helper_1(self):
k1 = HashKey(10, 'aaa')
k2 = HashKey(10, 'bbb')