()
| 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() { |
nothing calls this directly
no test coverage detected