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

Method test_expression_completion

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

Source from the content-addressed store, hash-verified

5025 self.assertIn(b'hello!', output)
5026
5027 def test_expression_completion(self):
5028 script = textwrap.dedent("""
5029 value = "speci"
5030 import pdb; pdb.Pdb().set_trace()
5031 """)
5032
5033 # Complete: value + 'al'
5034 input = b"val\t + 'al'\n"
5035 # Complete: p value + 'es'
5036 input += b"p val\t + 'es'\n"
5037 # Complete: $_frame
5038 input += b"$_fra\t\n"
5039 # Continue
5040 input += b"c\n"
5041
5042 output = run_pty(script, input)
5043
5044 self.assertIn(b'special', output)
5045 self.assertIn(b'species', output)
5046 self.assertIn(b'$_frame', output)
5047
5048 def test_builtin_completion(self):
5049 script = textwrap.dedent("""

Callers

nothing calls this directly

Calls 3

run_ptyFunction · 0.90
assertInMethod · 0.80
dedentMethod · 0.45

Tested by

no test coverage detected