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

Function assert_python_ok

Lib/test/support/script_helper.py:171–182  ·  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

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

Calls 1

_assert_pythonFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…