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

Function assert_python_ok

Lib/test/support/script_helper.py:170–181  ·  view source on GitHub ↗

Assert that running the interpreter with `args` and optional environment variables `env_vars` succeeds (rc == 0) and return a (return code, stdout, stderr) tuple. If the __cleanenv keyword is set, env_vars is used as a fresh environment. Python is started in isolated mode (com

(*args, **env_vars)

Source from the content-addressed store, hash-verified

168
169
170def assert_python_ok(*args, **env_vars):
171 """
172 Assert that running the interpreter with `args` and optional environment
173 variables `env_vars` succeeds (rc == 0) and return a (return code, stdout,
174 stderr) tuple.
175
176 If the __cleanenv keyword is set, env_vars is used as a fresh environment.
177
178 Python is started in isolated mode (command line option -I),
179 except if the __isolated keyword is set to False.
180 """
181 return _assert_python(True, *args, **env_vars)
182
183
184def assert_python_failure(*args, **env_vars):

Calls 1

_assert_pythonFunction · 0.85