~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
 
161
161
    def test_registry_converter(self):
162
162
        options = [option.RegistryOption('format', '',
163
 
                   bzrdir.format_registry, bzrdir.format_registry.make_bzrdir)]
 
163
                   controldir.format_registry, controldir.format_registry.make_bzrdir)]
164
164
        opts, args = self.parse(options, ['--format', 'knit'])
165
165
        self.assertIsInstance(opts.format.repository_format,
166
166
                              knitrepo.RepositoryFormatKnit1)
167
167
 
168
168
    def test_lazy_registry(self):
169
169
        options = [option.RegistryOption('format', '',
170
 
                   lazy_registry=('bzrlib.bzrdir','format_registry'),
 
170
                   lazy_registry=('bzrlib.controldir','format_registry'),
171
171
                   converter=str)]
172
172
        opts, args = self.parse(options, ['--format', 'knit'])
173
173
        self.assertEqual({'format': 'knit'}, opts)