Rev 5318: Make the interbranch test_no_get_parent_map_after_insert_stream test work for looms - a little ugly, will want a generic hook-out to foreign formats in some form, at some point. in http://bazaar.launchpad.net/~lifeless/bzr/loomsupport

Robert Collins robertc at robertcollins.net
Thu Jun 24 09:16:52 BST 2010


At http://bazaar.launchpad.net/~lifeless/bzr/loomsupport

------------------------------------------------------------
revno: 5318
revision-id: robertc at robertcollins.net-20100624081636-ydyi6fla9jvlcmda
parent: pqm at pqm.ubuntu.com-20100623081421-53539k281zgrktsu
committer: Robert Collins <robertc at robertcollins.net>
branch nick: loomsupport
timestamp: Thu 2010-06-24 18:16:36 +1000
message:
  Make the interbranch test_no_get_parent_map_after_insert_stream test work for looms - a little ugly, will want a generic hook-out to foreign formats in some form, at some point.
=== modified file 'bzrlib/tests/per_interbranch/test_push.py'
--- a/bzrlib/tests/per_interbranch/test_push.py	2010-06-17 06:30:22 +0000
+++ b/bzrlib/tests/per_interbranch/test_push.py	2010-06-24 08:16:36 +0000
@@ -19,6 +19,11 @@
 from cStringIO import StringIO
 import os
 
+from testtools.matchers import (
+    Equals,
+    MatchesAny,
+    )
+
 from bzrlib import (
     branch,
     builtins,
@@ -272,10 +277,14 @@
         calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
         # After inserting the stream the client has no reason to query the
         # remote graph any further.
-        self.assertEqual(
-            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
-             'get', 'Branch.set_last_revision_info', 'Branch.unlock'],
-            calls_after_insert_stream)
+        bzr_core_trace = Equals(
+            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
+             'get', 'Branch.set_last_revision_info', 'Branch.unlock'])
+        bzr_loom_trace = Equals(
+            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
+             'get', 'Branch.set_last_revision_info', 'get', 'Branch.unlock'])
+        self.assertThat(calls_after_insert_stream,
+            MatchesAny(bzr_core_trace, bzr_loom_trace))
 
     def disableOptimisticGetParentMap(self):
         # Tweak some class variables to stop remote get_parent_map calls asking




More information about the bazaar-commits mailing list