/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-08-07 21:24:40 UTC
  • mfrom: (7058.4.30 python3-x)
  • Revision ID: breezy.the.bot@gmail.com-20180807212440-m7r0c45ihwr0kcre
Fix another round of tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-x/+merge/352226

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
from ..mutabletree import MutableTree
63
63
from ..sixish import (
64
64
    BytesIO,
 
65
    PY3,
65
66
    text_type,
66
67
    )
67
68
from . import (
2548
2549
        new_globals.update(globals)
2549
2550
        new_func = types.FunctionType(func.__code__, new_globals,
2550
2551
            func.__name__, func.__defaults__)
2551
 
        setattr(instance, method_name,
2552
 
            types.MethodType(new_func, instance, instance.__class__))
 
2552
        if PY3:
 
2553
            setattr(instance, method_name,
 
2554
                types.MethodType(new_func, instance))
 
2555
        else:
 
2556
            setattr(instance, method_name,
 
2557
                types.MethodType(new_func, instance, instance.__class__))
2553
2558
        self.addCleanup(delattr, instance, method_name)
2554
2559
 
2555
2560
    @staticmethod