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