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

Function test_xor

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

Source from the content-addressed store, hash-verified

348
349
350def test_xor(make_timeline):
351 eggs_exp = Mark("eggs")
352 ham_exp = Mark("ham")
353 cheese_exp = Mark("cheese")
354
355 timeline, _ = make_timeline()
356 t1 = timeline.beginning
357
358 with timeline.frozen():
359 assert t1 >> (eggs_exp ^ ham_exp) not in timeline
360 assert t1 >> (ham_exp ^ eggs_exp) not in timeline
361 assert t1 >> (cheese_exp ^ ham_exp ^ eggs_exp) not in timeline
362
363 timeline.mark("eggs")
364 with timeline.frozen():
365 assert t1 >> (eggs_exp ^ ham_exp) in timeline
366 assert t1 >> (ham_exp ^ eggs_exp) in timeline
367 assert t1 >> (cheese_exp ^ ham_exp ^ eggs_exp) in timeline
368 t2 = timeline.last
369
370 timeline.mark("ham")
371 with timeline.frozen():
372 assert t1 >> (eggs_exp ^ ham_exp) not in timeline
373 assert t2 >> (eggs_exp ^ ham_exp) in timeline
374 assert t1 >> (ham_exp ^ eggs_exp) not in timeline
375 assert t2 >> (ham_exp ^ eggs_exp) in timeline
376 assert t1 >> (cheese_exp ^ ham_exp ^ eggs_exp) not in timeline
377 assert t2 >> (cheese_exp ^ ham_exp ^ eggs_exp) in timeline
378
379
380def test_conditional(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…