示例#1
0
 def test_remove_object(self):
     map = identitymap.IdentityMap()
     weave = "foo"
     map.add_weave("id", weave)
     map.remove_object(weave)
     map.add_weave("id", weave)
示例#2
0
 def test_add_weave(self):
     map = identitymap.IdentityMap()
     weave = "foo"
     map.add_weave("id", weave)
     self.assertEqual(weave, map.find_weave("id"))
示例#3
0
 def test_double_add_weave(self):
     map = identitymap.IdentityMap()
     weave = "foo"
     map.add_weave("id", weave)
     self.assertRaises(errors.BzrError, map.add_weave, "id", weave)
     self.assertEqual(weave, map.find_weave("id"))
示例#4
0
 def test_construct(self):
     identitymap.IdentityMap()