mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Skip optional monitoring C API tests before tool registration
Check the existing optional _testcapi import before allocating monitoring tool IDs, so setUp SkipTest leaves no state for subsequent tests. Assisted-by: OpenAI Codex:model identifier unavailable
This commit is contained in:
1 parent
6482adf66f
commit
246c309322
1 file changed
+1
-1
Vendored
+1
-1
@@ -2599,9 +2599,9 @@ class TestCApiEventGeneration(MonitoringTestBase, unittest.TestCase):
|
||||
self._testcapi.monitoring_exit_scope()
|
||||
|
||||
def setUp(self):
|
||||
self._testcapi = import_helper.import_module("_testcapi")
|
||||
super(TestCApiEventGeneration, self).setUp()
|
||||
|
||||
self._testcapi = import_helper.import_module("_testcapi")
|
||||
capi = self._testcapi
|
||||
|
||||
self.codelike = capi.CodeLike(2)
|
||||
|
||||
Reference in new issue
Block a user