use depyler_core::transpile_python_to_rust;
#[test]
fn test_sys_argv() {
let python = r#"
import sys
def get_args() -> list:
return sys.argv
"#;
let result = transpile_python_to_rust(python).expect("Transpilation failed");
assert!(result.contains("args") && result.contains("collect"));
}
#[test]
fn test_sys_exit() {
let python = r#"
import sys
def exit_program(code: int) -> None:
sys.exit(code)
"#;
let result = transpile_python_to_rust(python).expect("Transpilation failed");
assert!(result.contains("std::process::exit"));
}
#[test]
fn test_sys_platform() {
let python = r#"
import sys
def get_platform() -> str:
return sys.platform
"#;
let result = transpile_python_to_rust(python).expect("Transpilation failed");
assert!(result.contains("linux") || result.contains("darwin") || result.contains("win32"));
}