diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_pdb.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 2ec4e2e..67a4053 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -3289,6 +3289,27 @@ class PdbTestReadline(unittest.TestCase): self.assertIn(b'continue', output) self.assertIn(b'hello!', output) + def test_expression_completion(self): + script = textwrap.dedent(""" + value = "speci" + import pdb; pdb.Pdb().set_trace() + """) + + # Complete: value + 'al' + input = b"val\t + 'al'\n" + # Complete: p value + 'es' + input += b"p val\t + 'es'\n" + # Complete: $_frame + input += b"$_fra\t\n" + # Continue + input += b"c\n" + + output = run_pty(script, input) + + self.assertIn(b'special', output) + self.assertIn(b'species', output) + self.assertIn(b'$_frame', output) + def load_tests(loader, tests, pattern): from test import test_pdb |