/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 bzrlib/tests/per_branch/test_check.py

  • Committer: Martin
  • Date: 2017-05-21 18:16:32 UTC
  • mto: (6621.2.22 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: gzlist@googlemail.com-20170521181632-kll0wqnsq8pipfpj
Use BytesIO or StringIO from bzrlib.sixish

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for branch implementations - test check() functionality"""
18
18
 
19
 
from StringIO import StringIO
20
19
 
21
 
from bzrlib import errors, tests, ui
 
20
from bzrlib import (
 
21
    errors,
 
22
    tests,
 
23
    ui,
 
24
)
 
25
from bzrlib.sixish import (
 
26
    BytesIO,
 
27
    )
22
28
from bzrlib.symbol_versioning import deprecated_in
23
29
from bzrlib.tests.per_branch import TestCaseWithBranch
24
30
 
53
59
        self.addCleanup(tree.unlock)
54
60
        refs = self.make_refs(tree.branch)
55
61
        result = tree.branch.check(refs)
56
 
        ui.ui_factory = tests.TestUIFactory(stdout=StringIO())
 
62
        ui.ui_factory = tests.TestUIFactory(stdout=BytesIO())
57
63
        result.report_results(True)
58
64
        self.assertContainsRe('revno does not match len',
59
65
            ui.ui_factory.stdout.getvalue())