Skip to content

Commit 377e824

Browse files
committed
fix CR
1 parent d043654 commit 377e824

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Lib/test/test_monitoring.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,10 +2583,9 @@ def test_monitoring_live_at_shutdown(self):
25832583

25842584

25852585
class TestCApiEventGeneration(MonitoringTestBase, unittest.TestCase):
2586-
_testcapi = import_helper.import_module("_testcapi")
2587-
25882586
class Scope:
25892587
def __init__(self, *args):
2588+
self._testcapi = import_helper.import_module("_testcapi")
25902589
self.args = args
25912590

25922591
def __enter__(self):
@@ -2595,12 +2594,10 @@ def __enter__(self):
25952594
def __exit__(self, *args):
25962595
self._testcapi.monitoring_exit_scope()
25972596

2598-
Scope._testcapi = _testcapi
2599-
26002597
def setUp(self):
26012598
super(TestCApiEventGeneration, self).setUp()
26022599

2603-
capi = self._testcapi
2600+
capi = import_helper.import_module("_testcapi")
26042601

26052602
self.codelike = capi.CodeLike(2)
26062603

0 commit comments

Comments
 (0)