MCPcopy Create free account
hub / github.com/PyO3/pyo3 / test_run_python_script

Function test_run_python_script

pyo3-build-config/src/impl_.rs:4371–4379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4369
4370 #[test]
4371 fn test_run_python_script() {
4372 // as above, this should be okay in CI where Python is presumed installed
4373 let interpreter = make_interpreter_config()
4374 .expect("could not get InterpreterConfig from installed interpreter");
4375 let out = interpreter
4376 .run_python_script("print(2 + 2)")
4377 .expect("failed to run Python script");
4378 assert_eq!(out.trim_end(), "4");
4379 }
4380
4381 #[test]
4382 fn test_run_python_script_with_envs() {

Callers

nothing calls this directly

Calls 2

make_interpreter_configFunction · 0.85
run_python_scriptMethod · 0.80

Tested by

no test coverage detected