aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-11-20 13:45:42 -0500
committerYury Selivanov <yury@magic.io>2018-11-20 14:25:07 -0500
commitb72bfe4b2ca5af1a031662381dd0740d396a026c (patch)
tree1b0bdf4511db225ce8a41327812abf331f767845
parente1de4d45d365f64950eef7587eb688d1a3caff0f (diff)
downloadimmutables-b72bfe4b2ca5af1a031662381dd0740d396a026c.tar.gz
immutables-b72bfe4b2ca5af1a031662381dd0740d396a026c.zip
Fix error message: "has been finalized" -> "has been finished"
-rw-r--r--immutables/_map.c2
-rw-r--r--immutables/map.py6
-rw-r--r--tests/test_map.py8
3 files changed, 8 insertions, 8 deletions
diff --git a/immutables/_map.c b/immutables/_map.c
index d5d7f97..e39e85f 100644
--- a/immutables/_map.c
+++ b/immutables/_map.c
@@ -3723,7 +3723,7 @@ mapmut_check_finalized(MapMutationObject *o)
if (o->m_mutid == 0) {
PyErr_Format(
PyExc_ValueError,
- "mutation %R has been finalized",
+ "mutation %R has been finished",
o, NULL);
return -1;
}
diff --git a/immutables/map.py b/immutables/map.py
index a393b72..73581ed 100644
--- a/immutables/map.py
+++ b/immutables/map.py
@@ -642,7 +642,7 @@ class MapMutation:
def __delitem__(self, key):
if self.__mutid == 0:
- raise ValueError('mutation {!r} has been finalized'.format(self))
+ raise ValueError('mutation {!r} has been finished'.format(self))
res, new_root = self.__root.without(
0, map_hash(key), key, self.__mutid)
@@ -657,7 +657,7 @@ class MapMutation:
def __setitem__(self, key, val):
if self.__mutid == 0:
- raise ValueError('mutation {!r} has been finalized'.format(self))
+ raise ValueError('mutation {!r} has been finished'.format(self))
self.__root, added = self.__root.assoc(
0, map_hash(key), key, val, self.__mutid)
@@ -667,7 +667,7 @@ class MapMutation:
def pop(self, key, *args):
if self.__mutid == 0:
- raise ValueError('mutation {!r} has been finalized'.format(self))
+ raise ValueError('mutation {!r} has been finished'.format(self))
if len(args) > 1:
raise TypeError(
diff --git a/tests/test_map.py b/tests/test_map.py
index 69684e8..d7ee885 100644
--- a/tests/test_map.py
+++ b/tests/test_map.py
@@ -1141,16 +1141,16 @@ class BaseMapTest:
mm = m.mutate()
mm.finish()
- with self.assertRaisesRegex(ValueError, 'has been finalized'):
+ with self.assertRaisesRegex(ValueError, 'has been finished'):
mm.pop('a')
- with self.assertRaisesRegex(ValueError, 'has been finalized'):
+ with self.assertRaisesRegex(ValueError, 'has been finished'):
del mm['a']
- with self.assertRaisesRegex(ValueError, 'has been finalized'):
+ with self.assertRaisesRegex(ValueError, 'has been finished'):
mm.set('a', 'b')
- with self.assertRaisesRegex(ValueError, 'has been finalized'):
+ with self.assertRaisesRegex(ValueError, 'has been finished'):
mm['a'] = 'b'
def test_map_mut_13(self):