/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/test_branch.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:
22
22
also see this file.
23
23
"""
24
24
 
25
 
from cStringIO import StringIO
26
 
 
27
25
from bzrlib import (
28
26
    branch as _mod_branch,
29
27
    bzrdir,
38
36
    BzrBranch5,
39
37
    BzrBranchFormat5,
40
38
    )
 
39
from bzrlib.sixish import (
 
40
    BytesIO,
 
41
    )
41
42
 
42
43
 
43
44
class TestDefaultFormat(tests.TestCase):
710
711
        r.old_revno = 10
711
712
        r.new_revid = "new-revid"
712
713
        r.new_revno = 20
713
 
        f = StringIO()
 
714
        f = BytesIO()
714
715
        r.report(f)
715
716
        self.assertEqual("Now on revision 20.\n", f.getvalue())
716
717
        self.assertEqual("Now on revision 20.\n", f.getvalue())
719
720
        r = _mod_branch.PullResult()
720
721
        r.old_revid = "same-revid"
721
722
        r.new_revid = "same-revid"
722
 
        f = StringIO()
 
723
        f = BytesIO()
723
724
        r.report(f)
724
725
        self.assertEqual("No revisions or tags to pull.\n", f.getvalue())