/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_push.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.push behaviour."""
18
18
 
19
 
from cStringIO import StringIO
20
19
import os
21
20
 
22
21
from bzrlib import (
32
31
    tests,
33
32
    transport,
34
33
    )
 
34
from bzrlib.sixish import (
 
35
    BytesIO,
 
36
    )
35
37
from bzrlib.smart import (
36
38
    client,
37
39
    )
287
289
        # stack on trunk.
288
290
        self.make_bzrdir('.').get_config().set_default_stack_on('trunk')
289
291
        # Push rev-2 to a new branch "remote".  It will be stacked on "trunk".
290
 
        output = StringIO()
 
292
        output = BytesIO()
291
293
        push._show_push_branch(trunk, 'rev-2', self.get_url('remote'), output)
292
294
        # Push rev-3 onto "remote".  If "remote" not stacked and is missing the
293
295
        # fulltext record for f-id @ rev-1, then this will fail.
438
440
        """The 'bzr push' command should make a limited number of HPSS calls.
439
441
        """
440
442
        cmd = builtins.cmd_push()
441
 
        cmd.outf = tests.StringIOWrapper()
 
443
        cmd.outf = BytesIO()
442
444
        cmd.run(
443
445
            directory=self.get_url('empty'),
444
446
            location=self.smart_server.get_url() + 'target')