/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_transform.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:
63
63
)
64
64
from ..merge import Merge3Merger, Merger
65
65
from ..mutabletree import MutableTree
66
 
from ..sixish import (
67
 
    BytesIO,
68
 
    PY3,
69
 
    text_type,
70
 
    )
71
66
from . import (
72
67
    features,
73
68
    TestCaseInTempDir,
892
887
        raw_conflicts = resolve_conflicts(tt)
893
888
        cooked_conflicts = cook_conflicts(raw_conflicts, tt)
894
889
        tt.finalize()
895
 
        conflicts_s = [text_type(c) for c in cooked_conflicts]
 
890
        conflicts_s = [str(c) for c in cooked_conflicts]
896
891
        self.assertEqual(len(cooked_conflicts), len(conflicts_s))
897
892
        self.assertEqual(conflicts_s[0], 'Conflict adding file dorothy.  '
898
893
                                         'Moved existing file to '
2611
2606
        new_globals.update(globals)
2612
2607
        new_func = types.FunctionType(func.__code__, new_globals,
2613
2608
                                      func.__name__, func.__defaults__)
2614
 
        if PY3:
2615
 
            setattr(instance, method_name,
2616
 
                    types.MethodType(new_func, instance))
2617
 
        else:
2618
 
            setattr(instance, method_name,
2619
 
                    types.MethodType(new_func, instance, instance.__class__))
 
2609
        setattr(instance, method_name,
 
2610
                types.MethodType(new_func, instance))
2620
2611
        self.addCleanup(delattr, instance, method_name)
2621
2612
 
2622
2613
    @staticmethod