~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-21 23:18:45 UTC
  • mfrom: (3785.1.5 command-registry)
  • Revision ID: pqm@pqm.ubuntu.com-20081021231845-k119hl1icewguq50
Use Registry for plugin commands, enable lazy command loading.

Show diffs side-by-side

added added

removed removed

Lines of Context:
412
412
            self.assertContainsRe(help, '\[myplug\]')
413
413
        finally:
414
414
            # unregister command
415
 
            if bzrlib.commands.plugin_cmds.get('myplug', None):
416
 
                del bzrlib.commands.plugin_cmds['myplug']
 
415
            if 'myplug' in bzrlib.commands.plugin_cmds:
 
416
                bzrlib.commands.plugin_cmds.remove('myplug')
417
417
            # remove the plugin 'myplug'
418
418
            if getattr(bzrlib.plugins, 'myplug', None):
419
419
                delattr(bzrlib.plugins, 'myplug')