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

Method test_dir_as_script

Lib/test/test_pdb.py:4236–4239  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4234 self.assertIn(f"ImportError: No module named {os_helper.TESTFN}", stdout)
4235
4236 def test_dir_as_script(self):
4237 with os_helper.temp_dir() as temp_dir:
4238 stdout, stderr = self._run_pdb([temp_dir], "", expected_returncode=1)
4239 self.assertIn(f"Error: {temp_dir} is a directory", stdout)
4240
4241 def test_invalid_cmd_line_options(self):
4242 stdout, stderr = self._run_pdb(["-c"], "", expected_returncode=2)

Callers

nothing calls this directly

Calls 3

_run_pdbMethod · 0.95
temp_dirMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected