mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-117174: Add a new route in linecache to fetch interactive source code (#117500)
This commit is contained in:
parent
ecdf6b15b0
commit
a931a8b324
16 changed files with 142 additions and 93 deletions
|
@ -213,7 +213,7 @@ class TestInteractiveInterpreter(unittest.TestCase):
|
|||
p.stdin.write(user_input)
|
||||
user_input2 = dedent("""
|
||||
import linecache
|
||||
print(linecache.cache['<stdin>-1'])
|
||||
print(linecache._interactive_cache[id(foo.__code__)])
|
||||
""")
|
||||
p.stdin.write(user_input2)
|
||||
output = kill_python(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue