Commit 5e5c5540 authored by Jason Madden's avatar Jason Madden

Test the error message for setting a jar for consistencey between c and python.

parent 90104c33
......@@ -117,7 +117,12 @@ class _Persistent_Base(object):
new_jar = self._makeJar()
def _test():
inst._p_jar = new_jar
self.assertRaises(ValueError, _test)
try:
inst._p_jar = new_jar
except ValueError as e:
self.assertEqual(str(e), "can not change _p_jar of cached object")
else:
self.fail("Should raise ValueError")
def test_assign_p_jar_w_valid_jar(self):
jar = self._makeJar()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment