Rev 70: Fix for bzr.dev test API changes. in http://people.ubuntu.com/~robertc/baz2.0/plugins/search/trunk

Robert Collins robertc at robertcollins.net
Tue Mar 10 23:10:45 GMT 2009


At http://people.ubuntu.com/~robertc/baz2.0/plugins/search/trunk

------------------------------------------------------------
revno: 70
revision-id: robertc at robertcollins.net-20090310231042-27np6tzqfp9wztxy
parent: robertc at robertcollins.net-20090121075957-oohxgh668zis7ceq
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2009-03-11 10:10:42 +1100
message:
  Fix for bzr.dev test API changes.
=== modified file 'tests/test_index.py'
--- a/tests/test_index.py	2008-12-02 22:36:33 +0000
+++ b/tests/test_index.py	2009-03-10 23:10:42 +0000
@@ -24,11 +24,10 @@
 from bzrlib.plugins import search
 from bzrlib.plugins.search import errors, index
 from bzrlib.tests import (
-    adapt_tests,
     condition_isinstance,
+    multiply_tests,
     split_suite_by_condition,
     TestCaseWithTransport,
-    TestScenarioApplier,
     )
 
 
@@ -40,14 +39,13 @@
             TestComponentCombiner)))
     graph_suggestion, other_tests = split_suite_by_condition(other_tests,
         condition_isinstance(TestGraphIndexSuggestions))
-    adapter = TestScenarioApplier()
-    adapter.scenarios = [(format_string[:-1], {'format':format}) for
+    scenarios = [(format_string[:-1], {'format':format}) for
         format_string, format in index._FORMATS.items()]
-    adapt_tests(component_tests, adapter, other_tests)
-    adapter.scenarios = [
+    multiply_tests(component_tests, scenarios, other_tests)
+    scenarios = [
         ("GraphIndex", {'format': (InMemoryGraphIndex, index.SuggestableGraphIndex)}),
         ("BTree", {'format': (BTreeBuilder, index.SuggestableBTreeGraphIndex)})]
-    adapt_tests(graph_suggestion, adapter, other_tests)
+    multiply_tests(graph_suggestion, scenarios, other_tests)
     return other_tests
 
 




More information about the bazaar-commits mailing list