/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: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

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,