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

Function test_simple_enum

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

Source from the content-addressed store, hash-verified

463
464#[test]
465fn test_simple_enum() {
466 let code = r#"
467import enum
468@enum._simple_enum(enum.IntFlag, boundary=enum.KEEP)
469class RegexFlag:
470 NOFLAG = 0
471 DEBUG = 1
472print(RegexFlag.NOFLAG & RegexFlag.DEBUG)
473"#;
474 let compiled = compile(code, Mode::Exec, "<string>", CompileOpts::default());
475 dbg!(compiled.expect("compile error"));
476}

Callers

nothing calls this directly

Calls 1

compileFunction · 0.70

Tested by

no test coverage detected