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

  • Committer: Breezy landing bot
  • Author(s): Colin Watson
  • Date: 2020-11-16 21:47:08 UTC
  • mfrom: (7521.1.1 remove-lp-workaround)
  • Revision ID: breezy.the.bot@gmail.com-20201116214708-jos209mgxi41oy15
Remove breezy.git workaround for bazaar.launchpad.net.

Merged from https://code.launchpad.net/~cjwatson/brz/remove-lp-workaround/+merge/393710

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Tests for bzrlib.debug"""
18
 
 
19
 
 
20
 
from bzrlib import (
 
17
"""Tests for breezy.debug"""
 
18
 
 
19
 
 
20
from .. import (
21
21
    config,
22
22
    debug,
23
23
    tests,
27
27
class TestDebugFlags(tests.TestCaseInTempDir):
28
28
 
29
29
    def test_set_no_debug_flags_from_config(self):
30
 
        self.assertDebugFlags([], '')
 
30
        self.assertDebugFlags([], b'')
31
31
 
32
32
    def test_set_single_debug_flags_from_config(self):
33
 
        self.assertDebugFlags(['hpss'], 'debug_flags = hpss\n')
 
33
        self.assertDebugFlags(['hpss'], b'debug_flags = hpss\n')
34
34
 
35
35
    def test_set_multiple_debug_flags_from_config(self):
36
 
        self.assertDebugFlags(['hpss', 'error'], 'debug_flags = hpss, error\n')
 
36
        self.assertDebugFlags(
 
37
            ['hpss', 'error'], b'debug_flags = hpss, error\n')
37
38
 
38
39
    def assertDebugFlags(self, expected_flags, conf_bytes):
39
40
        conf = config.GlobalStack()
40
 
        conf.store._load_from_string('[DEFAULT]\n' + conf_bytes)
 
41
        conf.store._load_from_string(b'[DEFAULT]\n' + conf_bytes)
41
42
        conf.store.save()
42
43
        self.overrideAttr(debug, 'debug_flags', set())
43
44
        debug.set_debug_flags_from_config()