Skip to content

Commit 9a2d780

Browse files
morealclaude
andcommitted
Add snapshot test for nested BoolOp bytecode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 11152d4 commit 9a2d780

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

crates/codegen/src/compile.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9092,6 +9092,15 @@ if (True and False) or (False and True):
90929092
));
90939093
}
90949094

9095+
#[test]
9096+
fn test_nested_bool_op() {
9097+
assert_dis_snapshot!(compile_exec(
9098+
"\
9099+
x = Test() and False or False
9100+
"
9101+
));
9102+
}
9103+
90959104
#[test]
90969105
fn test_nested_double_async_with() {
90979106
assert_dis_snapshot!(compile_exec(

crates/codegen/src/snapshots/rustpython_codegen__compile__tests__nested_bool_op.snap

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)