summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_code.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-04-12 11:04:55 (GMT)
committerGitHub <noreply@github.com>2023-04-12 11:04:55 (GMT)
commit411b1692811b2ecac59cb0df0f920861c7cf179a (patch)
tree64f7234e9d35623565ff1bb7fbd2c4688e8d3774 /Lib/test/test_code.py
parentdce2d38cb04b541bad477ccc1040a68fa70a9a69 (diff)
downloadcpython-411b1692811b2ecac59cb0df0f920861c7cf179a.zip
cpython-411b1692811b2ecac59cb0df0f920861c7cf179a.tar.gz
cpython-411b1692811b2ecac59cb0df0f920861c7cf179a.tar.bz2
GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083)
* The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
Diffstat (limited to 'Lib/test/test_code.py')
-rw-r--r--Lib/test/test_code.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index 7543c9a..ecb3525 100644
--- a/Lib/test/test_code.py
+++ b/Lib/test/test_code.py
@@ -349,14 +349,14 @@ class CodeTest(unittest.TestCase):
def foo():
pass
- # assert that opcode 238 is invalid
- self.assertEqual(opname[238], '<238>')
+ # assert that opcode 229 is invalid
+ self.assertEqual(opname[229], '<229>')
- # change first opcode to 0xee (=238)
+ # change first opcode to 0xeb (=229)
foo.__code__ = foo.__code__.replace(
- co_code=b'\xee' + foo.__code__.co_code[1:])
+ co_code=b'\xe5' + foo.__code__.co_code[1:])
- msg = f"unknown opcode 238"
+ msg = f"unknown opcode 229"
with self.assertRaisesRegex(SystemError, msg):
foo()