(self)
| 217 | self.assertIn(expected.encode('utf-8'), out) |
| 218 | |
| 219 | def test_pdb_issue4201(self): |
| 220 | test_src = textwrap.dedent("""\ |
| 221 | def f(): |
| 222 | pass |
| 223 | |
| 224 | import pdb |
| 225 | pdb.Pdb(nosigint=True).runcall(f) |
| 226 | """) |
| 227 | with os_helper.temp_dir() as d: |
| 228 | script_name = make_script(d, 'script', test_src) |
| 229 | p = spawn_python(script_name) |
| 230 | p.stdin.write(b'l\n') |
| 231 | data = kill_python(p) |
| 232 | # bdb/pdb applies normcase to its filename before displaying |
| 233 | self.assertIn(os.path.normcase(script_name.encode('utf-8')), data) |
| 234 | zip_name, run_name = make_zip_script(d, "test_zip", |
| 235 | script_name, '__main__.py') |
| 236 | p = spawn_python(zip_name) |
| 237 | p.stdin.write(b'l\n') |
| 238 | data = kill_python(p) |
| 239 | # bdb/pdb applies normcase to its filename before displaying |
| 240 | self.assertIn(os.path.normcase(run_name.encode('utf-8')), data) |
| 241 | |
| 242 | def test_import_filter_syntax_warnings_by_module(self): |
| 243 | filename = support.findfile('test_import/data/syntax_warnings.py') |
nothing calls this directly
no test coverage detected