MCPcopy Index your code
hub / github.com/python/cpython / test_local_namespace

Method test_local_namespace

Lib/test/test_pdb.py:5083–5099  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5081 self.assertIn(b'102', output)
5082
5083 def test_local_namespace(self):
5084 script = textwrap.dedent("""
5085 def f():
5086 original = "I live Pythin"
5087 import pdb; pdb.Pdb().set_trace()
5088 f()
5089 """)
5090
5091 # Complete: original.replace('i', 'o')
5092 input = b"orig\t.repl\t('i', 'o')\n"
5093
5094 # Continue
5095 input += b"c\n"
5096
5097 output = run_pty(script, input)
5098
5099 self.assertIn(b'I love Python', output)
5100
5101 @unittest.skipIf(sys.platform.startswith('freebsd'),
5102 '\\x08 is not interpreted as backspace on FreeBSD')

Callers

nothing calls this directly

Calls 3

run_ptyFunction · 0.90
assertInMethod · 0.80
dedentMethod · 0.45

Tested by

no test coverage detected