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

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import sys
20
20
 
 
21
import breezy
21
22
from .. import (
22
 
    plugin as _mod_plugin,
23
23
    symbol_versioning,
24
24
    tests,
25
25
    )
97
97
            'a_feature',
98
98
            'UnicodeFilenameFeature',
99
99
            replacement_module='breezy.tests.features')
100
 
 
101
100
        def test_caller(message, category=None, stacklevel=1):
102
101
            # Find ourselves back from the right frame
103
102
            caller = sys._getframe(stacklevel)
133
132
class TestPluginLoadedFeature(tests.TestCase):
134
133
 
135
134
    def test_available_plugin(self):
136
 
        plugins = _mod_plugin.plugins()
137
 
        if not plugins:
 
135
        if not breezy.global_state.plugins:
138
136
            self.skipTest('no plugins available to test with')
139
 
        a_plugin_name = next(iter(plugins))
 
137
        a_plugin_name = next(iter(breezy.global_state.plugins))
140
138
        feature = features.PluginLoadedFeature(a_plugin_name)
141
139
        self.assertEqual(a_plugin_name, feature.plugin_name)
142
140
        self.assertEqual(a_plugin_name + ' plugin', str(feature))
156
154
        # We can't test much more than that because the behaviour depends
157
155
        # on the platform.
158
156
        features.UnicodeFilenameFeature._probe()
159
 
 
160
 
 
161
 
class TestBackslashFilenameFeature(tests.TestCase):
162
 
 
163
 
    def test_probe_passes(self):
164
 
        """BackslashFilenameFeature._probe passes."""
165
 
        # We can't test much more than that because the behaviour depends
166
 
        # on the platform.
167
 
        features.BackslashFilenameFeature._probe()