/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/test_plugins.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-06-10 18:19:26 UTC
  • mfrom: (6672.1.3 kill-api)
  • Revision ID: breezy.the.bot@gmail.com-20170610181926-cmki2ndblpjrtn7k
Remove ``breezy.api`` and the concept of API versions.

Merged from https://code.launchpad.net/~jelmer/brz/kill-api/+merge/325442

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
        """
297
297
        name = 'wants100.py'
298
298
        with open(name, 'w') as f:
299
 
            f.write("import breezy.api\n"
300
 
                "breezy.api.require_any_api(breezy, [(1, 0, 0)])\n")
 
299
            f.write("import breezy\n"
 
300
                "from breezy.errors import IncompatibleVersion\n"
 
301
                "raise IncompatibleVersion(breezy, [(1, 0, 0)], (0, 0, 5))\n")
301
302
        log = self.load_and_capture(name)
302
303
        self.assertNotContainsRe(log,
303
 
            r"It requested API version")
 
304
            r"It supports breezy version")
304
305
        self.assertEqual({'wants100'}, viewkeys(self.plugin_warnings))
305
306
        self.assertContainsRe(
306
307
            self.plugin_warnings['wants100'][0],
307
 
            r"It requested API version")
 
308
            r"It supports breezy version")
308
309
 
309
310
    def test_plugin_with_bad_name_does_not_load(self):
310
311
        # The file name here invalid for a python module.