MCPcopy Create free account
hub / github.com/cpmech/plotpy / call_python3_works

Function call_python3_works

src/fileio.rs:64–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63 #[test]
64 fn call_python3_works() {
65 let commands = "print(\"Python says: Hello World!\")".to_string();
66 let path = Path::new("call_python3_works.py");
67 let output = call_python3("python3", &commands, &path).unwrap();
68 let data = fs::read_to_string(&path).map_err(|_| "cannot read test file").unwrap();
69 let correct = "print(\"Python says: Hello World!\")".to_string();
70 assert_eq!(data, correct);
71 assert_eq!(output, "Python says: Hello World!\n");
72 }
73
74 #[test]
75 fn call_python3_create_dir_works() {

Callers

nothing calls this directly

Calls 1

call_python3Function · 0.85

Tested by

no test coverage detected