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

Function call_python3_create_dir_works

src/fileio.rs:75–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73
74 #[test]
75 fn call_python3_create_dir_works() {
76 let commands = "print(\"Python says: Hello World!\")".to_string();
77 let path = Path::new(OUT_DIR).join("call_python3_works.py");
78 let output = call_python3("python3", &commands, &path).unwrap();
79 let data = fs::read_to_string(&path).map_err(|_| "cannot read test file").unwrap();
80 let correct = "print(\"Python says: Hello World!\")".to_string();
81 assert_eq!(data, correct);
82 assert_eq!(output, "Python says: Hello World!\n");
83 }
84
85 #[test]
86 fn call_python3_twice_works() {

Callers

nothing calls this directly

Calls 1

call_python3Function · 0.85

Tested by

no test coverage detected