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