MCPcopy Create free account
hub / github.com/apache/arrow / run_with_env_var

Function run_with_env_var

python/pyarrow/tests/test_misc.py:68–74  ·  view source on GitHub ↗
(env_var)

Source from the content-addressed store, hash-verified

66 """
67
68 def run_with_env_var(env_var):
69 env = os.environ.copy()
70 env['ARROW_IO_THREADS'] = env_var
71 res = subprocess.run([sys.executable, "-c", code], env=env,
72 capture_output=True)
73 res.check_returncode()
74 return res.stdout.decode(), res.stderr.decode()
75
76 out, err = run_with_env_var('17')
77 assert out.strip() == '17'

Callers 1

Calls 4

copyMethod · 0.80
check_returncodeMethod · 0.80
runMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected