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

Function test_new

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

Source from the content-addressed store, hash-verified

514
515
516def test_new(make_timeline):
517 timeline, _ = make_timeline()
518
519 m1 = timeline.mark("1")
520 timeline.freeze()
521
522 assert timeline.expect_new(Mark("1")) is m1
523 with pytest.raises(Exception):
524 timeline.expect_new(Mark("2"))
525
526 timeline.proceed()
527 m2 = timeline.mark("2")
528 timeline.freeze()
529
530 with pytest.raises(Exception):
531 timeline.expect_new(Mark("1"))
532 assert timeline.expect_new(Mark("2")) is m2
533 with pytest.raises(Exception):
534 timeline.expect_new(Mark("3"))
535
536 timeline.unfreeze()
537 m3 = timeline.mark("3")
538 timeline.freeze()
539
540 with pytest.raises(Exception):
541 timeline.expect_new(Mark("1"))
542 assert timeline.expect_new(Mark("2")) is m2
543 assert timeline.expect_new(Mark("3")) is m3
544
545 timeline.proceed()
546 m4 = timeline.mark("4")
547 timeline.mark("4")
548 timeline.freeze()
549
550 with pytest.raises(Exception):
551 timeline.expect_new(Mark("1"))
552 with pytest.raises(Exception):
553 timeline.expect_new(Mark("2"))
554 with pytest.raises(Exception):
555 timeline.expect_new(Mark("3"))
556 assert timeline.expect_new(Mark("4")) is m4
557
558
559@pytest.mark.timeout(3)

Callers

nothing calls this directly

Calls 7

MarkFunction · 0.90
make_timelineFunction · 0.85
markMethod · 0.80
freezeMethod · 0.80
expect_newMethod · 0.80
proceedMethod · 0.80
unfreezeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…