| 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') |