summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dis.py
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2025-01-31 10:50:54 (GMT)
committerGitHub <noreply@github.com>2025-01-31 10:50:54 (GMT)
commit674befbd7be3bffee66772ff9fdef168feda47ef (patch)
tree05b689a8acc4672bcdf56df45af42bd7d6047e3e /Lib/test/test_dis.py
parente3eba8ce266f90d9f8faeb5b2b4b64e56110bd2a (diff)
downloadcpython-674befbd7be3bffee66772ff9fdef168feda47ef.zip
cpython-674befbd7be3bffee66772ff9fdef168feda47ef.tar.gz
cpython-674befbd7be3bffee66772ff9fdef168feda47ef.tar.bz2
GH-129386: Add `test.support.reset_code` (GH-129486)
Diffstat (limited to 'Lib/test/test_dis.py')
-rw-r--r--Lib/test/test_dis.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py
index bba2ac8..e99289c 100644
--- a/Lib/test/test_dis.py
+++ b/Lib/test/test_dis.py
@@ -15,7 +15,7 @@ import types
import unittest
from test.support import (captured_stdout, requires_debug_ranges,
requires_specialization, cpython_only,
- os_helper, import_helper)
+ os_helper, import_helper, reset_code)
from test.support.bytecode_helper import BytecodeTestCase
@@ -1356,7 +1356,7 @@ class DisTests(DisTestBase):
self.code_quicken(f)
else:
# "copy" the code to un-quicken it:
- f.__code__ = f.__code__.replace()
+ reset_code(f)
for instruction in _unroll_caches_as_Instructions(dis.get_instructions(
f, show_caches=True, adaptive=adaptive
), show_caches=True):