MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_run_script

Function test_run_script

src/lib.rs:380–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

378
379 #[test]
380 fn test_run_script() {
381 interpreter().enter(|vm| {
382 vm.unwrap_pyresult((|| {
383 let scope = vm.new_scope_with_main()?;
384 // test file run
385 run_file(vm, scope, "extra_tests/snippets/dir_main/__main__.py")?;
386
387 #[cfg(feature = "host_env")]
388 {
389 let scope = vm.new_scope_with_main()?;
390 // test module run (directory with __main__.py)
391 run_file(vm, scope, "extra_tests/snippets/dir_main")?;
392 }
393
394 Ok(())
395 })());
396 })
397 }
398}

Callers

nothing calls this directly

Calls 5

interpreterFunction · 0.85
run_fileFunction · 0.85
unwrap_pyresultMethod · 0.80
new_scope_with_mainMethod · 0.80
enterMethod · 0.45

Tested by

no test coverage detected