MCPcopy Create free account
hub / github.com/microsoft/debugpy / when

Method when

tests/timeline.py:366–370  ·  view source on GitHub ↗

For every occurrence recorded after this call, invokes callback(occurrence) if occurrence == expectation.

(self, expectation, callback)

Source from the content-addressed store, hash-verified

364 return self._record(occ, block)
365
366 def when(self, expectation, callback):
367 """For every occurrence recorded after this call, invokes callback(occurrence)
368 if occurrence == expectation.
369 """
370 self._listeners.append((expectation, callback))
371
372 def _snapshot(self):
373 last = self._last

Callers 2

attach_listenFunction · 0.45
test_conditionalFunction · 0.45

Calls 1

appendMethod · 0.45

Tested by 1

test_conditionalFunction · 0.36