/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 breezy/tests/test_options.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        options = [option.Option('number', type=int)]
111
111
        opts, args = self.parse(options, ['--number', '6'])
112
112
        self.assertEqual(6, opts.number)
113
 
        self.assertRaises(errors.BzrCommandError, self.parse, options,
 
113
        self.assertRaises(errors.CommandError, self.parse, options,
114
114
                          ['--number'])
115
 
        self.assertRaises(errors.BzrCommandError, self.parse, options,
 
115
        self.assertRaises(errors.CommandError, self.parse, options,
116
116
                          ['--no-number'])
 
117
        self.assertRaises(errors.CommandError, self.parse, options,
 
118
                          ['--number', 'a'])
117
119
 
118
120
    def test_is_hidden(self):
119
121
        self.assertTrue(option.Option('foo', hidden=True).is_hidden('foo'))
134
136
        self.assertEqual({'format': 'two'}, opts)
135
137
        self.assertRaises(option.BadOptionValue, self.parse, options,
136
138
                          ['--format', 'three'])
137
 
        self.assertRaises(errors.BzrCommandError, self.parse, options,
 
139
        self.assertRaises(errors.CommandError, self.parse, options,
138
140
                          ['--two'])
139
141
        options = [option.RegistryOption('format', '', registry, str,
140
142
                                         value_switches=True)]
147
149
        self.assertEqual({'format': 'two'}, opts)
148
150
        options = [option.RegistryOption('format', '', registry, str,
149
151
                                         enum_switch=False)]
150
 
        self.assertRaises(errors.BzrCommandError, self.parse, options,
 
152
        self.assertRaises(errors.CommandError, self.parse, options,
151
153
                          ['--format', 'two'])
152
154
 
153
155
    def test_override(self):
371
373
                    msgs.append('%-16s %-16s %s' %
372
374
                                ((scope or 'GLOBAL'), name, 'NO HELP'))
373
375
                elif not option_re.match(helptxt):
374
 
                    if name.startswith("format/"):
375
 
                        # Don't complain about the odd format registry help
376
 
                        continue
377
376
                    msgs.append('%-16s %-16s %s' %
378
377
                                ((scope or 'GLOBAL'), name, helptxt))
379
378
        if msgs: