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

Function test_and

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

Source from the content-addressed store, hash-verified

277
278
279def test_and(make_timeline):
280 eggs_exp = Mark("eggs")
281 ham_exp = Mark("ham")
282 cheese_exp = Mark("cheese")
283
284 timeline, _ = make_timeline()
285 t = timeline.beginning
286
287 with timeline.frozen():
288 assert t >> (eggs_exp & ham_exp) not in timeline
289 assert t >> (ham_exp & eggs_exp) not in timeline
290 assert t >> (cheese_exp & ham_exp & eggs_exp) not in timeline
291
292 timeline.mark("eggs")
293 with timeline.frozen():
294 assert t >> (eggs_exp & ham_exp) not in timeline
295 assert t >> (ham_exp & eggs_exp) not in timeline
296 assert t >> (cheese_exp & ham_exp & eggs_exp) not in timeline
297
298 timeline.mark("ham")
299 with timeline.frozen():
300 assert t >> (eggs_exp & ham_exp) in timeline
301 assert t >> (ham_exp & eggs_exp) in timeline
302 assert t >> (cheese_exp & ham_exp & eggs_exp) not in timeline
303
304 timeline.mark("cheese")
305 with timeline.frozen():
306 assert t >> (eggs_exp & ham_exp) in timeline
307 assert t >> (ham_exp & eggs_exp) in timeline
308 assert t >> (cheese_exp & ham_exp & eggs_exp) in timeline
309
310
311def test_or(make_timeline):

Callers

nothing calls this directly

Calls 4

MarkFunction · 0.90
make_timelineFunction · 0.85
frozenMethod · 0.80
markMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…