/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: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Tests for plugins"""
19
19
 
20
20
import importlib
 
21
from io import StringIO
21
22
import logging
22
23
import os
23
24
import sys
30
31
    tests,
31
32
    )
32
33
from ..tests.features import pkg_resources_feature
33
 
from ..sixish import (
34
 
    StringIO,
35
 
    viewkeys,
36
 
    )
37
34
 
38
35
 
39
36
# TODO: Write a test for plugin decoration of commands.
301
298
        log = self.load_and_capture(name)
302
299
        self.assertNotContainsRe(log,
303
300
                                 r"It supports breezy version")
304
 
        self.assertEqual({'wants100'}, viewkeys(self.plugin_warnings))
 
301
        self.assertEqual({'wants100'}, self.plugin_warnings.keys())
305
302
        self.assertContainsRe(
306
303
            self.plugin_warnings['wants100'][0],
307
304
            r"It supports breezy version")
700
697
        self.create_plugin_package('ugly')
701
698
        self.overrideEnv('BRZ_DISABLE_PLUGINS', 'bad:ugly')
702
699
        self.load_with_paths(['.'])
703
 
        self.assertEqual({'good'}, viewkeys(self.plugins))
 
700
        self.assertEqual({'good'}, self.plugins.keys())
704
701
        self.assertPluginModules({
705
702
            'good': self.plugins['good'].module,
706
703
            'bad': None,