/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: Aaron Bentley
  • Date: 2006-11-17 04:06:03 UTC
  • mfrom: (2139 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2162.
  • Revision ID: aaron.bentley@utoronto.ca-20061117040603-pgebxndswvwk26tt
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Ltd
 
1
# Copyright (C) 2005 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
# GNU General Public License for more details.
12
 
 
 
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
 
18
17
"""Tests for plugins"""
19
18
 
20
19
# XXX: There are no plugin tests at the moment because the plugin module
148
147
        help = {}
149
148
        current = None
150
149
        for line in self.capture('help commands').splitlines():
151
 
            if line.startswith('bzr '):
152
 
                current = line.split()[1]
 
150
            if not line.startswith(' '):
 
151
                current = line.split()[0]
153
152
            help[current] = help.get(current, '') + line
154
153
 
155
154
        return help
189
188
            help = self.capture('help myplug')
190
189
            self.assertContainsRe(help, 'From plugin "myplug"')
191
190
            help = self.split_help_commands()['myplug']
192
 
            self.assertContainsRe(help, 'From plugin "myplug"')
 
191
            self.assertContainsRe(help, '\[myplug\]')
193
192
        finally:
194
193
            # remove the plugin 'plugin'
195
194
            if getattr(bzrlib.plugins, 'plugin', None):