We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2eb97aa commit 29c0d89Copy full SHA for 29c0d89
src/main.rs
@@ -131,6 +131,19 @@ fn run_script(vm: &VirtualMachine, script_file: &str) -> PyResult {
131
}
132
133
134
+#[test]
135
+fn test_run_script() {
136
+ let vm = VirtualMachine::new();
137
+
138
+ // test file run
139
+ let r = run_script(&vm, "tests/snippets/dir_main/__main__.py");
140
+ assert!(r.is_ok());
141
142
+ // test module run
143
+ let r = run_script(&vm, "tests/snippets/dir_main");
144
145
+}
146
147
fn shell_exec(vm: &VirtualMachine, source: &str, scope: Scope) -> Result<(), CompileError> {
148
match compile::compile(vm, source, &compile::Mode::Single, "<stdin>".to_string()) {
149
Ok(code) => {
0 commit comments