Skip to content

Commit 12c1d10

Browse files
committed
Dont' require _testcapi for test_monitoring.py
1 parent a85e73b commit 12c1d10

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_monitoring.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import test.support
1515
from test.support import import_helper, requires_specialization, script_helper
1616

17-
_testcapi = import_helper.import_module("_testcapi")
1817
_testinternalcapi = import_helper.import_module("_testinternalcapi")
1918

2019
PAIR = (0,1)
@@ -2579,21 +2578,22 @@ def test_monitoring_live_at_shutdown(self):
25792578

25802579

25812580
class TestCApiEventGeneration(MonitoringTestBase, unittest.TestCase):
2581+
_testcapi = import_helper.import_module("_testcapi")
25822582

25832583
class Scope:
25842584
def __init__(self, *args):
25852585
self.args = args
25862586

25872587
def __enter__(self):
2588-
_testcapi.monitoring_enter_scope(*self.args)
2588+
self._testcapi.monitoring_enter_scope(*self.args)
25892589

25902590
def __exit__(self, *args):
2591-
_testcapi.monitoring_exit_scope()
2591+
self._testcapi.monitoring_exit_scope()
25922592

25932593
def setUp(self):
25942594
super(TestCApiEventGeneration, self).setUp()
25952595

2596-
capi = _testcapi
2596+
capi = self._testcapi
25972597

25982598
self.codelike = capi.CodeLike(2)
25992599

0 commit comments

Comments
 (0)