cpython: bf997b22df06 (original) (raw)
Mercurial > cpython
changeset 99979:bf997b22df06 3.5
Fix BytecodeTestCase.assertNotInBytecode() Issue #11816: Fix bytecode_helper to handle correctly errors. Don't use unassigned variables. [#11816]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Tue, 19 Jan 2016 08:48:48 +0100 |
parents | 3c9512d8ac0d |
children | 1f003062d830 652a50208e89 |
files | Lib/test/bytecode_helper.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-)[+] [-] Lib/test/bytecode_helper.py 4 |
line wrap: on
line diff
--- a/Lib/test/bytecode_helper.py +++ b/Lib/test/bytecode_helper.py @@ -32,8 +32,8 @@ class BytecodeTestCase(unittest.TestCase """Throws AssertionError if op is found""" for instr in dis.get_instructions(x): if instr.opname == opname:
disassembly = self.get_disassembly_as_string(co)[](#l1.7)
if opargval is _UNSPECIFIED:[](#l1.8)
disassembly = self.get_disassembly_as_string(x)[](#l1.9)
if argval is _UNSPECIFIED:[](#l1.10) msg = '%s occurs in bytecode:\n%s' % (opname, disassembly)[](#l1.11) elif instr.argval == argval:[](#l1.12) msg = '(%s,%r) occurs in bytecode:\n%s'[](#l1.13)