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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-09-01 20:21:26 UTC
  • mfrom: (7067.13.16 python3-y)
  • Revision ID: breezy.the.bot@gmail.com-20180901202126-6r9fzlprpqcky4k5
Various fixes for tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-y/+merge/353193

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Whitebox tests for annotate functionality."""
18
18
 
19
19
import codecs
 
20
from io import BytesIO
20
21
 
21
22
from .. import (
22
23
    annotate,
422
423
        annotate.annotate_file_tree(revtree_1, 'a',
423
424
            to_file=to_file, branch=tree1.branch)
424
425
 
425
 
        sio = StringIO()
 
426
        sio = BytesIO()
426
427
        to_file = codecs.getwriter('ascii')(sio, 'replace')
427
428
        annotate.annotate_file_tree(revtree_2, 'b',
428
429
            to_file=to_file, branch=tree1.branch)
429
 
        self.assertEqualDiff('2   p?rez   | bye\n', sio.getvalue())
 
430
        self.assertEqualDiff(b'2   p?rez   | bye\n', sio.getvalue())
430
431
 
431
432
        # test now with unicode file-like
432
433
        to_file = StringIOWithEncoding()