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

Method test_pdb_issue4201

Lib/test/test_zipimport_support.py:219–240  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 10

make_scriptFunction · 0.90
spawn_pythonFunction · 0.90
kill_pythonFunction · 0.90
make_zip_scriptFunction · 0.90
temp_dirMethod · 0.80
assertInMethod · 0.80
normcaseMethod · 0.80
dedentMethod · 0.45
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected