Test two failing hooks
()
| 43 | |
| 44 | |
| 45 | def test_command_chain_dispatcher_ff(): |
| 46 | """Test two failing hooks""" |
| 47 | fail1 = Fail("fail1") |
| 48 | fail2 = Fail("fail2") |
| 49 | dp = CommandChainDispatcher([(0, fail1), (10, fail2)]) |
| 50 | |
| 51 | with pytest.raises(TryNext) as e: |
| 52 | dp() |
| 53 | assert str(e.value) == "fail2" |
| 54 | |
| 55 | assert fail1.called is True |
| 56 | assert fail2.called is True |
| 57 | |
| 58 | |
| 59 | def test_command_chain_dispatcher_fofo(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…