diff options
author | Brandt Bucher <brandt@python.org> | 2021-11-11 19:44:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 19:44:34 (GMT) |
commit | 27b69e60daa7b191ee6bc76fb6d5fb7d793062ab (patch) | |
tree | dd7ad406d0be70084b77fcb6d646fc0c383c654d /Lib/test/test_peepholer.py | |
parent | 9178f533ff5ea7462a2ca22cfa67afd78dad433b (diff) | |
download | cpython-27b69e60daa7b191ee6bc76fb6d5fb7d793062ab.zip cpython-27b69e60daa7b191ee6bc76fb6d5fb7d793062ab.tar.gz cpython-27b69e60daa7b191ee6bc76fb6d5fb7d793062ab.tar.bz2 |
bpo-45773: Stop "optimizing" certain jump patterns (GH-29505)
Diffstat (limited to 'Lib/test/test_peepholer.py')
-rw-r--r-- | Lib/test/test_peepholer.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py index 7086a42b..8306c89 100644 --- a/Lib/test/test_peepholer.py +++ b/Lib/test/test_peepholer.py @@ -600,5 +600,12 @@ class TestBuglets(unittest.TestCase): except Exception or Exception: pass + def test_bpo_45773_pop_jump_if_true(self): + compile("while True or spam: pass", "<test>", "exec") + + def test_bpo_45773_pop_jump_if_false(self): + compile("while True or not spam: pass", "<test>", "exec") + + if __name__ == "__main__": unittest.main() |