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

Function test_compile_phello

crates/compiler/src/lib.rs:345–355  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343
344#[test]
345fn test_compile_phello() {
346 let code = r#"
347initialized = True
348def main():
349 print("Hello world!")
350if __name__ == '__main__':
351 main()
352"#;
353 let compiled = compile(code, Mode::Exec, "<>", CompileOpts::default());
354 dbg!(compiled.expect("compile error"));
355}
356
357#[test]
358fn test_compile_if_elif_else() {

Callers

nothing calls this directly

Calls 1

compileFunction · 0.70

Tested by

no test coverage detected