/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_merge3.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 BytesIO
18
17
 
19
18
from .. import (
20
19
    merge3,
21
20
    tests,
22
21
    )
23
22
from ..errors import BinaryFile
 
23
from ..sixish import (
 
24
    BytesIO,
 
25
    int2byte,
 
26
    )
24
27
 
25
28
 
26
29
def split_lines(t):
322
325
    def test_minimal_conflicts_unique(self):
323
326
        def add_newline(s):
324
327
            """Add a newline to each entry in the string"""
325
 
            return [(bytes([x]) + b'\n') for x in bytearray(s)]
 
328
            return [(int2byte(x) + b'\n') for x in bytearray(s)]
326
329
 
327
330
        base_text = add_newline(b"abcdefghijklm")
328
331
        this_text = add_newline(b"abcdefghijklmNOPQRSTUVWXYZ")
340
343
    def test_minimal_conflicts_nonunique(self):
341
344
        def add_newline(s):
342
345
            """Add a newline to each entry in the string"""
343
 
            return [(bytes([x]) + b'\n') for x in bytearray(s)]
 
346
            return [(int2byte(x) + b'\n') for x in bytearray(s)]
344
347
 
345
348
        base_text = add_newline(b"abacddefgghij")
346
349
        this_text = add_newline(b"abacddefgghijkalmontfprz")