/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): Martin
  • Date: 2017-06-10 23:10:27 UTC
  • mfrom: (6677.1.6 py3_crash_debug_trace)
  • Revision ID: breezy.the.bot@gmail.com-20170610231027-rmnb6npg1qb049fx
Make tests pass on Python 3 for crash, debug, and trace modules

Merged from https://code.launchpad.net/~gz/brz/py3_crash_debug_trace/+merge/325445

Show diffs side-by-side

added added

removed removed

Lines of Context:
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()