/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/ui_testing.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    ui,
23
23
)
24
24
from ..ui import text as ui_text
25
 
from ..sixish import (
26
 
    text_type,
27
 
)
28
25
 
29
26
 
30
27
class StringIOWithEncoding(io.StringIO):
54
51
    def __init__(self, stdin=None, stdout=None, stderr=None):
55
52
        if isinstance(stdin, bytes):
56
53
            stdin = stdin.decode()
57
 
        if isinstance(stdin, text_type):
 
54
        if isinstance(stdin, str):
58
55
            stdin = StringIOWithEncoding(stdin)
59
56
        if stdout is None:
60
57
            stdout = StringIOWithEncoding()