/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/interrepository_implementations/__init__.py

merge bzr.dev r4054

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
These test the conformance of all the interrepository variations to the
23
23
expected API including generally applicable corner cases.
24
 
Specific tests for individual formats are in the tests/test_repository.py file 
 
24
Specific tests for individual formats are in the tests/test_repository.py file
25
25
rather than in tests/interrepository_implementations/*.py.
26
26
"""
27
27
 
50
50
    """A tool to generate a suite testing multiple inter repository formats.
51
51
 
52
52
    This is done by copying the test once for each interrepo provider and injecting
53
 
    the transport_server, transport_readonly_server, repository_format and 
 
53
    the transport_server, transport_readonly_server, repository_format and
54
54
    repository_to_format classes into each copy.
55
55
    Each copy is also given a new id() to make it easy to identify.
56
56
    """
60
60
        self._transport_server = transport_server
61
61
        self._transport_readonly_server = transport_readonly_server
62
62
        self.scenarios = self.formats_to_scenarios(formats)
63
 
    
 
63
 
64
64
    def formats_to_scenarios(self, formats):
65
65
        """Transform the input formats to a list of scenarios.
66
66
 
81
81
                 })
82
82
            result.append(scenario)
83
83
        return result
84
 
    
 
84
 
85
85
    @staticmethod
86
86
    def default_test_list():
87
87
        """Generate the default list of interrepo permutations to test."""
88
88
        from bzrlib.repofmt import knitrepo, pack_repo, weaverepo
89
89
        result = []
90
 
        # test the default InterRepository between format 6 and the current 
 
90
        # test the default InterRepository between format 6 and the current
91
91
        # default format.
92
92
        # XXX: robertc 20060220 reinstate this when there are two supported
93
93
        # formats which do not have an optimal code path between them.
99
99
            if format_to_test is not None:
100
100
                result.append((optimiser_class,
101
101
                               format_to_test, format_to_test))
102
 
        # if there are specific combinations we want to use, we can add them 
 
102
        # if there are specific combinations we want to use, we can add them
103
103
        # here.
104
104
        result.append((InterModel1and2,
105
105
                       weaverepo.RepositoryFormat5(),