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

Method test_run_module_with_args

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

Source from the content-addressed store, hash-verified

4146 self.assertTrue(any("SUCCESS" in l for l in stdout.splitlines()), stdout)
4147
4148 def test_run_module_with_args(self):
4149 commands = """
4150 continue
4151 """
4152 self._run_pdb(["calendar", "-m"], commands, expected_returncode=1)
4153
4154 _, stderr = self._run_pdb(["-m", "calendar", "-p", "1"], commands)
4155 self.assertIn("unrecognized arguments: -p", stderr)
4156
4157 stdout, _ = self._run_pdb(["-m", "calendar", "1"], commands)
4158 self.assertIn("December", stdout)
4159
4160 stdout, _ = self._run_pdb(["-m", "calendar", "--type", "text"], commands)
4161 self.assertIn("December", stdout)
4162
4163 def test_run_script_with_args(self):
4164 script = """

Callers

nothing calls this directly

Calls 2

_run_pdbMethod · 0.95
assertInMethod · 0.80

Tested by

no test coverage detected