MCPcopy Index your code
hub / github.com/python/cpython / InvocationRecorder

Class InvocationRecorder

Lib/test/test_fileinput.py:839–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

837 self.assertIs(fileinput._state, instance)
838
839class InvocationRecorder:
840
841 def __init__(self):
842 self.invocation_count = 0
843
844 def __call__(self, *args, **kwargs):
845 self.invocation_count += 1
846 self.last_invocation = (args, kwargs)
847 return io.BytesIO(b'some bytes')
848
849
850class Test_hook_compressed(unittest.TestCase):

Callers 2

setUpMethod · 0.85
testMethod · 0.85

Calls

no outgoing calls

Tested by 2

setUpMethod · 0.68
testMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…