~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-04 17:42:22 UTC
  • mto: This revision was merged to the branch mainline in revision 6437.
  • Revision ID: v.ladeuil+lp@free.fr-20120104174222-tdt031gd262sh1f2
Feedback from review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3321
3321
    def test_empty(self):
3322
3322
        self.assertSectionIDs([], self.get_url(), '')
3323
3323
 
 
3324
    def test_url_vs_local_paths(self):
 
3325
        # The matcher location is an url and the section names are local paths
 
3326
        sections = self.assertSectionIDs(['/foo/bar', '/foo'],
 
3327
                                         'file:///foo/bar/baz', '''\
 
3328
[/foo]
 
3329
[/foo/bar]
 
3330
''')
 
3331
 
 
3332
    def test_local_path_vs_url(self):
 
3333
        # The matcher location is a local path and the section names are urls
 
3334
        sections = self.assertSectionIDs(['file:///foo/bar', 'file:///foo'],
 
3335
                                         '/foo/bar/baz', '''\
 
3336
[file:///foo]
 
3337
[file:///foo/bar]
 
3338
''')
 
3339
 
 
3340
 
3324
3341
    def test_no_name_section_included_when_present(self):
3325
3342
        # Note that other tests will cover the case where the no-name section
3326
3343
        # is empty and as such, not included.
3355
3372
[/foo/*/baz]
3356
3373
''')
3357
3374
        # Note that 'baz' as a relpath for /foo/b* is not fully correct, but
3358
 
        # nothing really does... as far using {relpath} to append it to
3359
 
        # something else, this seems good enough though.
 
3375
        # nothing really is... as far using {relpath} to append it to something
 
3376
        # else, this seems good enough though.
3360
3377
        self.assertEquals(['', 'baz', 'bar/baz'],
3361
3378
                          [s.locals['relpath'] for _, s in sections])
3362
3379