mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Patch #736962: port test_inspect to unittest. As part of this, move out
the fodder modules to separate files to get rid of the imp.load_source() trickery.
This commit is contained in:
parent
6b220b0355
commit
cb9015dc08
3 changed files with 381 additions and 349 deletions
22
Lib/test/inspect_fodder2.py
Normal file
22
Lib/test/inspect_fodder2.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# line 1
|
||||
def wrap(foo=None):
|
||||
def wrapper(func):
|
||||
return func
|
||||
return wrapper
|
||||
|
||||
# line 7
|
||||
def replace(func):
|
||||
def insteadfunc():
|
||||
print 'hello'
|
||||
return insteadfunc
|
||||
|
||||
# line 13
|
||||
@wrap()
|
||||
@wrap(wrap)
|
||||
def wrapped():
|
||||
pass
|
||||
|
||||
# line 19
|
||||
@replace
|
||||
def gone():
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue