~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
        f.write("""\
474
474
from bzrlib import commands
475
475
class cmd_myplug(commands.Command):
476
 
    __doc__ = '''Just a simple test plugin.'''
 
476
    '''Just a simple test plugin.'''
477
477
    aliases = ['mplg']
478
478
    def run(self):
479
479
        print 'Hello from my plugin'
780
780
        self.overrideAttr(plugin, '_loaded', False)
781
781
        plugin.load_plugins(['.'])
782
782
        self.assertPluginKnown('test_foo')
783
 
        self.assertDocstring("This is the doc for test_foo",
784
 
                             bzrlib.plugins.test_foo)
 
783
        self.assertEqual("This is the doc for test_foo",
 
784
                         bzrlib.plugins.test_foo.__doc__)
785
785
 
786
786
    def test_not_loaded(self):
787
787
        self.warnings = []
816
816
 
817
817
    def assertTestFooLoadedFrom(self, path):
818
818
        self.assertPluginKnown('test_foo')
819
 
        self.assertDocstring('This is the doc for test_foo',
820
 
                             bzrlib.plugins.test_foo)
 
819
        self.assertEqual('This is the doc for test_foo',
 
820
                         bzrlib.plugins.test_foo.__doc__)
821
821
        self.assertEqual(path, bzrlib.plugins.test_foo.dir_source)
822
822
 
823
823
    def test_regular_load(self):