/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: Jelmer Vernooij
  • Date: 2018-09-11 03:12:02 UTC
  • mfrom: (7101 work)
  • mto: This revision was merged to the branch mainline in revision 7102.
  • Revision ID: jelmer@jelmer.uk-20180911031202-p2wpqy0xzx7wjmid
Merge trunk.

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