MCPcopy Index your code
hub / github.com/RustPython/RustPython / RecorderWithDisable

Class RecorderWithDisable

Lib/test/test_monitoring.py:390–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388
389
390class RecorderWithDisable:
391
392 def __init__(self, events):
393 self.disable = False
394 self.events = events
395
396 def __call__(self, code, event):
397 self.events.append(event)
398 if self.disable:
399 return sys.monitoring.DISABLE
400
401
402class MontoringDisableAndRestartTest(MonitoringTestBase, unittest.TestCase):

Callers 4

test_lines_singleMethod · 0.85
test_lines_loopMethod · 0.85
test_lines_twoMethod · 0.85
check_linesMethod · 0.85

Calls

no outgoing calls

Tested by 4

test_lines_singleMethod · 0.68
test_lines_loopMethod · 0.68
test_lines_twoMethod · 0.68
check_linesMethod · 0.68