/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/per_repository/test_repository.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:
16
16
 
17
17
"""Tests for repository implementations - tests a repository format."""
18
18
 
 
19
from io import BytesIO
19
20
import re
20
21
 
21
22
from ... import (
42
43
from ...bzr import (
43
44
    knitpack_repo,
44
45
    )
45
 
from ...sixish import (
46
 
    BytesIO,
47
 
    text_type,
48
 
    unichr,
49
 
    )
50
46
from .. import (
51
47
    per_repository,
52
48
    test_server,
421
417
            self.assertEqual(rev.message, message)
422
418
        # insist the class is unicode no matter what came in for
423
419
        # consistency.
424
 
        self.assertIsInstance(rev.message, text_type)
 
420
        self.assertIsInstance(rev.message, str)
425
421
 
426
422
    def test_commit_unicode_message(self):
427
423
        # a siple unicode message should be preserved
429
425
 
430
426
    def test_commit_unicode_control_characters(self):
431
427
        # a unicode message with control characters should roundtrip too.
432
 
        unichars = [unichr(x) for x in range(256)]
 
428
        unichars = [chr(x) for x in range(256)]
433
429
        # '\r' is not directly allowed anymore, as it used to be translated
434
430
        # into '\n' anyway
435
431
        unichars[ord('\r')] = u'\n'