(make_timeline)
| 514 | |
| 515 | |
| 516 | def 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) |
nothing calls this directly
no test coverage detected
searching dependent graphs…