/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: 2019-03-05 07:32:38 UTC
  • mto: (7290.1.21 work)
  • mto: This revision was merged to the branch mainline in revision 7311.
  • Revision ID: jelmer@jelmer.uk-20190305073238-zlqn981opwnqsmzi
Add appveyor configuration.

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
 
    )
21
17
import os
22
18
import re
23
19
 
32
28
    gpg,
33
29
    trace,
34
30
    )
 
31
from ..sixish import (
 
32
    BytesIO,
 
33
    StringIO,
 
34
    unichr,
 
35
    )
35
36
 
36
37
 
37
38
class TestLogMixin(object):
157
158
            # By default we expect an empty list
158
159
            expected = kw.get(n, [])
159
160
            # strip out only the path components
160
 
            got = [x.path[1] or x.path[0] for x in getattr(delta, n)]
 
161
            got = [x[0] for x in getattr(delta, n)]
161
162
            self.assertEqual(expected, got)
162
163
 
163
164
    def assertInvalidRevisonNumber(self, br, start, end):
222
223
 
223
224
    def test_commit_message_with_control_chars(self):
224
225
        wt = self.make_branch_and_tree('.')
225
 
        msg = u"All 8-bit chars: " + ''.join([chr(x) for x in range(256)])
 
226
        msg = u"All 8-bit chars: " + ''.join([unichr(x) for x in range(256)])
226
227
        msg = msg.replace(u'\r', u'\n')
227
228
        wt.commit(msg)
228
229
        lf = LogCatcher()
240
241
        # newline conversion, neither LF (\x0A) nor CR (\x0D) are
241
242
        # included in the test commit message, even though they are
242
243
        # valid XML 1.0 characters.
243
 
        msg = "\x09" + ''.join([chr(x) for x in range(0x20, 256)])
 
244
        msg = "\x09" + ''.join([unichr(x) for x in range(0x20, 256)])
244
245
        wt.commit(msg)
245
246
        lf = LogCatcher()
246
247
        log.show_log(wt.branch, lf, verbose=True)