MCPcopy Index your code
hub / github.com/RustPython/RustPython / _check_script

Method _check_script

Lib/test/test_cmd_line_script.py:124–137  ·  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

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

Calls 3

_check_outputMethod · 0.95
assert_python_okFunction · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected