Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update test_dis
  • Loading branch information
iritkatriel committed Jan 15, 2025
commit cc4c11afb7abec73548d37494306e05741d952d7
6 changes: 4 additions & 2 deletions Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,12 +999,14 @@ def test_boundaries(self):
def test_widths(self):
long_opcodes = set(['JUMP_BACKWARD_NO_INTERRUPT',
'INSTRUMENTED_CALL_FUNCTION_EX'])
for opcode, opname in enumerate(dis.opname):
for op, opname in enumerate(dis.opname):
if opname in long_opcodes or opname.startswith("INSTRUMENTED"):
continue
if opname in opcode._specialized_opmap:
continue
with self.subTest(opname=opname):
width = dis._OPNAME_WIDTH
if opcode in dis.hasarg:
if op in dis.hasarg:
width += 1 + dis._OPARG_WIDTH
self.assertLessEqual(len(opname), width)

Expand Down