| 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(""" |