/breezy/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/trunk

« back to all changes in this revision

Viewing changes to breezy/tests/test_transform.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

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