summaryrefslogtreecommitdiff
path: root/Lib/test/test_peepholer.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-02-22 23:33:30 +0200
committerGitHub <noreply@github.com>2018-02-22 23:33:30 +0200
commit520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb (patch)
tree8a661515a3574b0d79ea2024a3b92646dd7ee837 /Lib/test/test_peepholer.py
parent4af8fd561433826ac897c55e41a087a5c5dbacf3 (diff)
downloadcpython-git-520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb.tar.gz
bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. (GH-5006)
Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Antoine Pitrou <antoine@python.org>
Diffstat (limited to 'Lib/test/test_peepholer.py')
-rw-r--r--Lib/test/test_peepholer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index 0cc1e92907..c24cf77e7b 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -268,7 +268,7 @@ class TestTranforms(BytecodeTestCase):
self.assertNotInBytecode(f, 'JUMP_ABSOLUTE')
returns = [instr for instr in dis.get_instructions(f)
if instr.opname == 'RETURN_VALUE']
- self.assertEqual(len(returns), 6)
+ self.assertLessEqual(len(returns), 6)
def test_elim_jump_after_return2(self):
# Eliminate dead code: jumps immediately after returns can't be reached
@@ -282,7 +282,7 @@ class TestTranforms(BytecodeTestCase):
self.assertEqual(len(returns), 1)
returns = [instr for instr in dis.get_instructions(f)
if instr.opname == 'RETURN_VALUE']
- self.assertEqual(len(returns), 2)
+ self.assertLessEqual(len(returns), 2)
def test_make_function_doesnt_bail(self):
def f():