/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 bzrlib/tests/test_plugins.py

  • Committer: Vincent Ladeuil
  • Date: 2009-08-21 09:19:11 UTC
  • mto: (4672.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4673.
  • Revision ID: v.ladeuil+lp@free.fr-20090821091911-hatou4w3xz99prlp
Fixes prompted by review.

* bzrlib/tests/test_plugins.py:
(TestEnvPluginPath.test_duplicates_are_removed): Check that paths
are clean.
(TestEnvPluginPath.test_bogus_references): Check robustness.

* bzrlib/plugin.py:
(get_site_plugin_path): Windows has no idea of a 'site' directory.
(get_standard_plugins_path): Simplified.

* bzrlib/help_topics/en/configuration.txt: 
Fix typos and bad grammar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
692
692
        # Ensures multiple removals don't left cruft
693
693
        self.check_path([self.core, self.site], ['-user', '-user'])
694
694
 
 
695
    def test_duplicates_are_removed(self):
 
696
        self.check_path([self.user, self.core, self.site],
 
697
                        ['+user', '+user'])
 
698
        # And only the first reference is kept (since the later references will
 
699
        # onnly produce <plugin> already loaded mutters)
 
700
        self.check_path([self.user, self.core, self.site],
 
701
                        ['+user', '+user', '+core',
 
702
                         '+user', '+site', '+site',
 
703
                         '+core'])
 
704
 
695
705
    def test_disable_overrides_disable(self):
696
706
        self.check_path([self.core, self.site], ['-user', '+user'])
697
707
 
722
732
        self.check_path(['myplugin', self.core, self.site, self.user],
723
733
                        ['myplugin', '+core', '+site', '+user'])
724
734
 
 
735
    def test_bogus_references(self):
 
736
        self.check_path(['+foo', '-bar', self.core, self.site],
 
737
                        ['+foo', '-bar'])