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

Function test_event

tests/tests/test_timeline.py:136–151  ·  view source on GitHub ↗
(make_timeline)

Source from the content-addressed store, hash-verified

134
135
136def test_event(make_timeline):
137 timeline, initial_history = make_timeline()
138 messages = MessageFactory()
139
140 event_msg = messages.event("stopped", {"reason": "pause"})
141 event_exp = expectation_of(event_msg)
142 event = timeline.record_event(event_msg)
143
144 assert event == event_exp
145 assert event.message is event_msg
146 assert event.circumstances == ("event", event_msg.event, event_msg.body)
147
148 with timeline.frozen():
149 assert timeline.last is event
150 assert timeline.history() == initial_history + [some.object.same_as(event)]
151 timeline.expect_realized(event_exp)
152
153
154@pytest.mark.parametrize("outcome", ["success", "failure"])

Callers

nothing calls this directly

Calls 9

make_timelineFunction · 0.85
MessageFactoryClass · 0.85
expectation_ofFunction · 0.85
record_eventMethod · 0.80
frozenMethod · 0.80
historyMethod · 0.80
same_asMethod · 0.80
expect_realizedMethod · 0.80
eventMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…