/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/test_options.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import re
18
18
 
19
 
from bzrlib import (
 
19
from .. import (
20
20
    bzrdir,
21
21
    commands,
22
22
    controldir,
24
24
    option,
25
25
    registry,
26
26
    )
27
 
from bzrlib.builtins import cmd_commit
28
 
from bzrlib.commands import parse_args
29
 
from bzrlib.tests import TestCase
30
 
from bzrlib.repofmt import knitrepo
 
27
from ..builtins import cmd_commit
 
28
from ..commands import parse_args
 
29
from . import TestCase
 
30
from ..repofmt import knitrepo
31
31
 
32
32
 
33
33
def parse(options, args):
167
167
 
168
168
    def test_lazy_registry(self):
169
169
        options = [option.RegistryOption('format', '',
170
 
                   lazy_registry=('bzrlib.controldir','format_registry'),
 
170
                   lazy_registry=('breezy.controldir','format_registry'),
171
171
                   converter=str)]
172
172
        opts, args = self.parse(options, ['--format', 'knit'])
173
173
        self.assertEqual({'format': 'knit'}, opts)
190
190
        registry = controldir.ControlDirFormatRegistry()
191
191
        bzrdir.register_metadir(registry, 'one', 'RepositoryFormat7', 'one help')
192
192
        bzrdir.register_metadir(registry, 'two',
193
 
            'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
 
193
            'breezy.repofmt.knitrepo.RepositoryFormatKnit1',
194
194
            'two help',
195
195
            )
196
196
        bzrdir.register_metadir(registry, 'hidden', 'RepositoryFormat7', 'hidden help',
218
218
        registry = controldir.ControlDirFormatRegistry()
219
219
        bzrdir.register_metadir(registry, 'one', 'RepositoryFormat7', 'one help')
220
220
        bzrdir.register_metadir(registry, 'two',
221
 
                'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
 
221
                'breezy.repofmt.knitrepo.RepositoryFormatKnit1',
222
222
                'two help',
223
223
                )
224
224
        registry.set_default('one')