[issue42199] bytecode_helper assertNotInBytecode fails too eagerly

Maxwell Bernstein report at bugs.python.org
Thu Oct 29 17:22:06 EDT 2020


New submission from Maxwell Bernstein <tekk.nolagi at gmail.com>:

assertNotInBytecode should only fail if:

* the instr matches and the arg is unspecified, or
* the instr matches, the arg is specified, and the arg matches

But right now it fails in a third case because of the dangling self.fail() call. The self.fail() call should be moved into the `if`/`elif`.

----------
components: Tests
messages: 379885
nosy: tekknolagi
priority: normal
severity: normal
status: open
title: bytecode_helper assertNotInBytecode fails too eagerly
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42199>
_______________________________________


More information about the Python-bugs-list mailing list