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

Function test_conditional

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

Source from the content-addressed store, hash-verified

378
379
380def test_conditional(make_timeline):
381 def is_exciting(occ):
382 return occ == Event(some.str, "exciting")
383
384 messages = MessageFactory()
385
386 something = Event("something", some.object)
387 something_exciting = something.when(is_exciting)
388 timeline, _ = make_timeline()
389 t = timeline.beginning
390
391 timeline.record_event(messages.event("something", "boring"))
392 with timeline.frozen():
393 timeline.expect_realized(t >> something)
394 timeline.expect_not_realized(t >> something_exciting)
395
396 timeline.record_event(messages.event("something", "exciting"))
397 with timeline.frozen():
398 timeline.expect_realized(t >> something_exciting)
399
400
401def test_lower_bound(make_timeline):

Callers

nothing calls this directly

Calls 9

EventFunction · 0.90
MessageFactoryClass · 0.85
make_timelineFunction · 0.85
record_eventMethod · 0.80
frozenMethod · 0.80
expect_realizedMethod · 0.80
expect_not_realizedMethod · 0.80
whenMethod · 0.45
eventMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…