view tests/test-extensions-wrapfunction.py.out @ 34128:82bd4c5a81e5

extensions: fix wrapcommand/function of class instance 5361771f9714 changed _updatewrapper() to copy the __name__ attribute, but not all callable objects has __name__. Spotted by loading mq with extdiff.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Sep 2017 23:37:14 +0900
parents 47e52f079a57
children
line wrap: on
line source

wrap 0: [0, 'orig']
wrap 1: [1, 0, 'orig']
wrap 2: [2, 1, 0, 'orig']
wrap 3: [3, 2, 1, 0, 'orig']
wrap 4: [4, 3, 2, 1, 0, 'orig']
wrap 0: [0, 4, 3, 2, 1, 0, 'orig']
unwrap 3: 3: [0, 4, 2, 1, 0, 'orig']
unwrap -: 0: [4, 2, 1, 0, 'orig']
unwrap 0: 0: [4, 2, 1, 'orig']
unwrap 4: 4: [2, 1, 'orig']
unwrap 0: -: ValueError
unwrap 2: 2: [1, 'orig']
unwrap 1: 1: ['orig']
unwrap -: -: IndexError
context manager ['orig']
context manager [1, 'orig']
context manager [0, 1, 'orig']
context manager [2, 0, 1, 'orig']
context manager [2, 1, 'orig']
context manager [2, 'orig']
wrap callable object [0, 'orig']