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

Method _check_script

Lib/test/test_cmd_line_script.py:122–135  ·  view source on GitHub ↗
(self, script_exec_args, expected_file,
                            expected_argv0, expected_path0,
                            expected_package, expected_loader,
                            *cmd_line_switches, cwd=None, **env_vars)

Source from the content-addressed store, hash-verified

120 self.assertIn(printed_cwd.encode('utf-8'), data)
121
122 def _check_script(self, script_exec_args, expected_file,
123 expected_argv0, expected_path0,
124 expected_package, expected_loader,
125 *cmd_line_switches, cwd=None, **env_vars):
126 if isinstance(script_exec_args, str):
127 script_exec_args = [script_exec_args]
128 run_args = [*support.optim_args_from_interpreter_flags(),
129 *cmd_line_switches, *script_exec_args, *example_args]
130 rc, out, err = assert_python_ok(
131 *run_args, __isolated=False, __cwd=cwd, **env_vars
132 )
133 self._check_output(script_exec_args, rc, out + err, expected_file,
134 expected_argv0, expected_path0,
135 expected_package, expected_loader, cwd)
136
137 def _check_import_error(self, script_exec_args, expected_msg,
138 *cmd_line_switches, cwd=None, **env_vars):

Calls 2

_check_outputMethod · 0.95
assert_python_okFunction · 0.90

Tested by

no test coverage detected