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

Class PatternExpectation

tests/timeline.py:740–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738
739
740class PatternExpectation(Expectation):
741 def __init__(self, *circumstances):
742 self.circumstances = circumstances
743
744 def test(self, first, last):
745 assert isinstance(first, Occurrence)
746 assert isinstance(last, Occurrence)
747
748 for occ in first.and_following(up_to=last, inclusive=True):
749 if occ.circumstances == self.circumstances:
750 yield {self: occ}
751
752 def describe(self):
753 rest = repr(self.circumstances[1:])
754 if rest.endswith(",)"):
755 rest = rest[:-2] + ")"
756 return f"<{self.circumstances[0]}{rest}>"
757
758 def __repr__(self):
759 return self.describe()
760
761
762def Mark(id):

Callers 4

MarkFunction · 0.85
EventFunction · 0.85
RequestFunction · 0.85
ResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…