/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 breezy/tests/blackbox/test_export_pot.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-06-17 12:46:13 UTC
  • mfrom: (6703.1.4 export-pot-plugin)
  • Revision ID: breezy.the.bot@gmail.com-20170617124613-wa5ff4m1ux6tu1co
Print an error when 'bzr export-pot' is called with the name of a plugin that doesn't exist.

Merged from https://code.launchpad.net/~jelmer/brz/export-pot-error/+merge/325884

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from breezy import ignores, osutils
22
22
from breezy.tests import TestCaseWithMemoryTransport
23
 
from breezy.tests.features import ModuleAvailableFeature
 
23
from breezy.tests.features import PluginLoadedFeature
24
24
 
25
25
class TestExportPot(TestCaseWithMemoryTransport):
26
26
 
30
30
        self.assertContainsRe(out, "help of 'change' option\n"\
31
31
                                   "msgid \"Select changes introduced by the specified revision.")
32
32
 
 
33
    def test_export_pot_plugin_unknown(self):
 
34
        out, err = self.run_bzr("export-pot --plugin=lalalala", retcode=3)
 
35
        self.assertContainsRe(
 
36
             err, 'ERROR: Plugin lalalala is not loaded')
 
37
 
33
38
    def test_export_pot_plugin(self):
34
 
        self.requireFeature(ModuleAvailableFeature('breezy.plugins.launchpad'))
 
39
        self.requireFeature(PluginLoadedFeature('launchpad'))
35
40
        out, err = self.run_bzr("export-pot --plugin=launchpad")
36
41
        self.assertContainsRe(err, 'Exporting messages from plugin command: launchpad-login in launchpad')
37
42
        self.assertContainsRe(out, 'msgid "Show or set the Launchpad user ID."')