~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: Alexander Belchenko
  • Date: 2006-12-21 15:15:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2215.
  • Revision ID: bialix@ukr.net-20061221151519-rl8q1d5bt7973oqp
cherrypicking: test_plugin_help_shows_plugin: fix cleanup after test

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
            help = self.split_help_commands()['myplug']
191
191
            self.assertContainsRe(help, '\[myplug\]')
192
192
        finally:
193
 
            # remove the plugin 'plugin'
194
 
            if getattr(bzrlib.plugins, 'plugin', None):
195
 
                del bzrlib.plugins.plugin
 
193
            # unregister command
 
194
            if bzrlib.commands.plugin_cmds.get('myplug', None):
 
195
                del bzrlib.commands.plugin_cmds['myplug']
 
196
            # remove the plugin 'myplug'
 
197
            if getattr(bzrlib.plugins, 'myplug', None):
 
198
                delattr(bzrlib.plugins, 'myplug')