/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

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()