/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 brzlib/tests/test_debug.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

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 breezy.debug"""
18
 
 
19
 
 
20
 
from .. import (
 
17
"""Tests for brzlib.debug"""
 
18
 
 
19
 
 
20
from brzlib 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([], b'')
 
30
        self.assertDebugFlags([], '')
31
31
 
32
32
    def test_set_single_debug_flags_from_config(self):
33
 
        self.assertDebugFlags(['hpss'], b'debug_flags = hpss\n')
 
33
        self.assertDebugFlags(['hpss'], 'debug_flags = hpss\n')
34
34
 
35
35
    def test_set_multiple_debug_flags_from_config(self):
36
 
        self.assertDebugFlags(
37
 
            ['hpss', 'error'], b'debug_flags = hpss, error\n')
 
36
        self.assertDebugFlags(['hpss', 'error'], 'debug_flags = hpss, error\n')
38
37
 
39
38
    def assertDebugFlags(self, expected_flags, conf_bytes):
40
39
        conf = config.GlobalStack()
41
 
        conf.store._load_from_string(b'[DEFAULT]\n' + conf_bytes)
 
40
        conf.store._load_from_string('[DEFAULT]\n' + conf_bytes)
42
41
        conf.store.save()
43
42
        self.overrideAttr(debug, 'debug_flags', set())
44
43
        debug.set_debug_flags_from_config()