~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Aaron Bentley
  • Date: 2007-03-02 04:53:10 UTC
  • mto: (2323.6.9 0.15-integration)
  • mto: This revision was merged to the branch mainline in revision 2330.
  • Revision ID: aaron.bentley@utoronto.ca-20070302045310-a4jr2qd18xuzqz25
Allow RegistryOption to omit the value-taking option

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        opts, args = self.parse(options, ['--two', '--one',
158
158
                                          '--format', 'two'])
159
159
        self.assertEqual({'format':'two'}, opts)
 
160
        options = [option.RegistryOption('format', '', registry, str,
 
161
                   enum_switch=False)]
 
162
        self.assertRaises(errors.BzrCommandError, self.parse, options,
 
163
                          ['--format', 'two'])
160
164
 
161
165
    def test_registry_converter(self):
162
166
        options = [option.RegistryOption('format', '',