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

Function test_compile_lambda3

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

Source from the content-addressed store, hash-verified

390
391#[test]
392fn test_compile_lambda3() {
393 let code = r#"
394def g():
395 pass
396def f():
397 if False:
398 return lambda x: g(x)
399 elif False:
400 return g
401 else:
402 return g
403"#;
404 let compiled = compile(code, Mode::Exec, "<>", CompileOpts::default());
405 dbg!(compiled.expect("compile error"));
406}
407
408#[test]
409fn test_compile_int() {

Callers

nothing calls this directly

Calls 1

compileFunction · 0.70

Tested by

no test coverage detected