summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 2e1cb5a..5268192 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -1062,7 +1062,9 @@ class TestSourcePositions(unittest.TestCase):
def assertOpcodeSourcePositionIs(self, code, opcode,
line, end_line, column, end_column, occurrence=1):
- for instr, position in zip(dis.Bytecode(code), code.co_positions()):
+ for instr, position in zip(
+ dis.Bytecode(code, show_caches=True), code.co_positions(), strict=True
+ ):
if instr.opname == opcode:
occurrence -= 1
if not occurrence: