mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-113054: Compiler no longer replaces a redundant jump with no line number by a NOP (#113139)
This commit is contained in:
parent
76d757b38b
commit
e51b400945
3 changed files with 22 additions and 1 deletions
|
@ -444,6 +444,10 @@ class TestSpecifics(unittest.TestCase):
|
|||
self.assertIn("_A__mangled_mod", A.f.__code__.co_varnames)
|
||||
self.assertIn("__package__", A.f.__code__.co_varnames)
|
||||
|
||||
def test_condition_expression_with_dead_blocks_compiles(self):
|
||||
# See gh-113054
|
||||
compile('if (5 if 5 else T): 0', '<eval>', 'exec')
|
||||
|
||||
def test_compile_invalid_namedexpr(self):
|
||||
# gh-109351
|
||||
m = ast.Module(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue