~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
from StringIO import StringIO
19
19
 
20
 
from bzrlib import conflicts
 
20
from bzrlib import (
 
21
    conflicts,
 
22
    merge as _mod_merge,
 
23
    option,
 
24
    )
21
25
from bzrlib.branch import Branch
22
26
from bzrlib.builtins import merge
23
27
from bzrlib.conflicts import ConflictList, TextConflict
206
210
        self.assertEqual(tree_b.conflicts(),
207
211
                         [conflicts.ContentsConflict('file',
208
212
                          file_id='file-id')])
 
213
    
 
214
    def test_merge_type_registry(self):
 
215
        merge_type_option = option.Option.OPTIONS['merge-type']
 
216
        self.assertFalse('merge4' in [x[0] for x in 
 
217
                        merge_type_option.iter_switches()])
 
218
        registry = _mod_merge.get_merge_type_registry()
 
219
        registry.register_lazy('merge4', 'bzrlib.merge', 'Merge4Merger',
 
220
                               'time-travelling merge')
 
221
        self.assertTrue('merge4' in [x[0] for x in 
 
222
                        merge_type_option.iter_switches()])
 
223
        registry.remove('merge4')
 
224
        self.assertFalse('merge4' in [x[0] for x in 
 
225
                        merge_type_option.iter_switches()])