MCPcopy Create free account
hub / github.com/Glyphack/enderpy / test_get_python_successfully

Function test_get_python_successfully

enderpy/src/main.rs:146–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144
145 #[test]
146 fn test_get_python_successfully() {
147 let executable = get_python_executable().expect("No python executable found!");
148 // Makes sure the python executable is working, without relying on a specific filename
149 assert!(executable.is_file());
150 let output = std::process::Command::new(executable)
151 .arg("-c")
152 .arg("print('Working')")
153 .output()
154 .unwrap();
155 assert_eq!(String::from_utf8(output.stdout).unwrap().trim(), "Working");
156 }
157}

Callers

nothing calls this directly

Calls 2

get_python_executableFunction · 0.85
expectMethod · 0.80

Tested by

no test coverage detected