/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_log.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:
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 io import (
 
18
    BytesIO,
 
19
    StringIO,
 
20
    )
17
21
import os
18
22
import re
19
23
 
28
32
    gpg,
29
33
    trace,
30
34
    )
31
 
from ..sixish import (
32
 
    BytesIO,
33
 
    StringIO,
34
 
    unichr,
35
 
    )
36
35
 
37
36
 
38
37
class TestLogMixin(object):
223
222
 
224
223
    def test_commit_message_with_control_chars(self):
225
224
        wt = self.make_branch_and_tree('.')
226
 
        msg = u"All 8-bit chars: " + ''.join([unichr(x) for x in range(256)])
 
225
        msg = u"All 8-bit chars: " + ''.join([chr(x) for x in range(256)])
227
226
        msg = msg.replace(u'\r', u'\n')
228
227
        wt.commit(msg)
229
228
        lf = LogCatcher()
241
240
        # newline conversion, neither LF (\x0A) nor CR (\x0D) are
242
241
        # included in the test commit message, even though they are
243
242
        # valid XML 1.0 characters.
244
 
        msg = "\x09" + ''.join([unichr(x) for x in range(0x20, 256)])
 
243
        msg = "\x09" + ''.join([chr(x) for x in range(0x20, 256)])
245
244
        wt.commit(msg)
246
245
        lf = LogCatcher()
247
246
        log.show_log(wt.branch, lf, verbose=True)