Rev 3824: Change the multiple_maps test to also be independent of sha hash. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/prefix
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 7 20:35:58 GMT 2009
At http://bzr.arbash-meinel.com/branches/bzr/brisbane/prefix
------------------------------------------------------------
revno: 3824
revision-id: john at arbash-meinel.com-20090107203540-qqb1nllc5dhwm81s
parent: john at arbash-meinel.com-20090107202850-pe25bhlinouu6o50
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: prefix
timestamp: Wed 2009-01-07 14:35:40 -0600
message:
Change the multiple_maps test to also be independent of sha hash.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_chk_map.py'
--- a/bzrlib/tests/test_chk_map.py 2009-01-07 20:28:50 +0000
+++ b/bzrlib/tests/test_chk_map.py 2009-01-07 20:35:40 +0000
@@ -1499,18 +1499,41 @@
('bba',): 'target2',
('bbb',): 'common',
})
- # The key for the target1 internal aa node
- aa_key = ('sha1:4c6b1e3e6ecb68fe039d2b00c9091bc037ebf203',)
+ target1_map = CHKMap(self.get_chk_bytes(), target1)
+ self.assertEqualDiff(
+ "'' InternalNode\n"
+ " 'a' InternalNode\n"
+ " 'aaa' LeafNode\n"
+ " ('aaa',) 'common'\n"
+ " 'aac' LeafNode\n"
+ " ('aac',) 'target1'\n"
+ " 'b' LeafNode\n"
+ " ('bbb',) 'common'\n",
+ target1_map._dump_tree())
+ # The key for the target1 internal a node
+ a_key = target1_map._root_node._items['a'].key()
# The key for the leaf aac node
- aac_key = ('sha1:8089f6b4f3bd2a058c41be199ef5af0c5b9a0c4f',)
+ aac_key = target1_map._root_node._items['a']._items['aac'].key()
+
+ target2_map = CHKMap(self.get_chk_bytes(), target2)
+ self.assertEqualDiff(
+ "'' InternalNode\n"
+ " 'a' LeafNode\n"
+ " ('aaa',) 'common'\n"
+ " 'b' InternalNode\n"
+ " 'bba' LeafNode\n"
+ " ('bba',) 'target2'\n"
+ " 'bbb' LeafNode\n"
+ " ('bbb',) 'common'\n",
+ target2_map._dump_tree())
# The key for the target2 internal bb node
- bb_key = ('sha1:bcc229e6bd1d606ef4630073dc15756e60508365',)
+ b_key = target2_map._root_node._items['b'].key()
# The key for the leaf bba node
- bba_key = ('sha1:5ce6a69a21060222bb0a5b48fdbfcca586cc9183',)
+ bba_key = target2_map._root_node._items['b']._items['bba'].key()
self.assertIterInteresting(
[([target1, target2], []),
- ([aa_key], []),
- ([bb_key], []),
+ ([a_key], []),
+ ([b_key], []),
([aac_key], [(('aac',), 'target1')]),
([bba_key], [(('bba',), 'target2')]),
], [target1, target2], [basis1, basis2])
More information about the bazaar-commits
mailing list