~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

Abbreviate pack_stat struct format to '>6L'

Show diffs side-by-side

added added

removed removed

Lines of Context:
452
452
    def test_final_fallback__version__with_version_info(self):
453
453
        self.setup_plugin("version_info = (1, 2, 3, 'final', 2)")
454
454
        plugin = bzrlib.plugin.plugins()['plugin']
455
 
        self.assertEqual("1.2.3.final.2", plugin.__version__)
 
455
        self.assertEqual("1.2.3.2", plugin.__version__)
456
456
 
457
457
 
458
458
class TestPluginHelp(tests.TestCaseInTempDir):
615
615
    def test_get_help_text_with_additional_see_also(self):
616
616
        mod = FakeModule('two lines of help\nand more', 'demo')
617
617
        topic = plugin.ModuleHelpTopic(mod)
618
 
        self.assertEqual("two lines of help\nand more\nSee also: bar, foo\n",
619
 
            topic.get_help_text(['foo', 'bar']))
 
618
        self.assertEqual("two lines of help\nand more\n\n:See also: bar, foo\n",
 
619
                         topic.get_help_text(['foo', 'bar']))
620
620
 
621
621
    def test_get_help_topic(self):
622
622
        """The help topic for a plugin is its module name."""
623
623
        mod = FakeModule('two lines of help\nand more', 'bzrlib.plugins.demo')
624
624
        topic = plugin.ModuleHelpTopic(mod)
625
625
        self.assertEqual('demo', topic.get_help_topic())
626
 
        mod = FakeModule('two lines of help\nand more', 'bzrlib.plugins.foo_bar')
 
626
        mod = FakeModule('two lines of help\nand more',
 
627
                         'bzrlib.plugins.foo_bar')
627
628
        topic = plugin.ModuleHelpTopic(mod)
628
629
        self.assertEqual('foo_bar', topic.get_help_topic())
629
630