mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
gh-104240: make _PyCompile_CodeGen support different compilation modes (#104241)
This commit is contained in:
parent
1b19bd1a88
commit
2c2dc61e8d
9 changed files with 43 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue