gh-104240: make _PyCompile_CodeGen support different compilation modes (#104241)

This commit is contained in:
Irit Katriel 2023-05-07 18:47:28 +01:00 committed by GitHub
parent 1b19bd1a88
commit 2c2dc61e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 43 additions and 15 deletions

View file

@ -25,6 +25,8 @@ def test_if_expression(self):
('LOAD_CONST', 2, 1),
exit_lbl,
('POP_TOP', None),
('LOAD_CONST', 3),
('RETURN_VALUE', None),
]
self.codegen_test(snippet, expected)
@ -46,5 +48,7 @@ def test_for_loop(self):
('JUMP', loop_lbl),
exit_lbl,
('END_FOR', None),
('LOAD_CONST', 0),
('RETURN_VALUE', None),
]
self.codegen_test(snippet, expected)