/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

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
 
18
 
17
19
import io
18
20
 
19
21
from .. import (
20
22
    ui,
21
23
)
22
24
from ..ui import text as ui_text
 
25
from ..sixish import (
 
26
    text_type,
 
27
)
23
28
 
24
29
 
25
30
class StringIOWithEncoding(io.StringIO):
49
54
    def __init__(self, stdin=None, stdout=None, stderr=None):
50
55
        if isinstance(stdin, bytes):
51
56
            stdin = stdin.decode()
52
 
        if isinstance(stdin, str):
 
57
        if isinstance(stdin, text_type):
53
58
            stdin = StringIOWithEncoding(stdin)
54
59
        if stdout is None:
55
60
            stdout = StringIOWithEncoding()