Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Unified Diff: Lib/test/inspect_fodder2.py

Issue 1764286: inspect.getsource does not work with decorated functions
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/inspect.py ('k') | Lib/test/test_inspect.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/inspect_fodder2.py Sun Sep 29 01:49:07 2013 +0200
+++ b/Lib/test/inspect_fodder2.py Sun Sep 29 12:44:49 2013 +0300
@@ -109,3 +109,16 @@
#line 109
def keyword_only_arg(*, arg):
pass
+
+from functools import wraps
+
+def decorator(func):
+ @wraps(func)
+ def fake():
+ return 42
+ return fake
+
+#line 121
+@decorator
+def real():
+ return 20
« no previous file with comments | « Lib/inspect.py ('k') | Lib/test/test_inspect.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+