MCPcopy Index your code
hub / github.com/ipython/ipython / test_command_chain_dispatcher_ff

Function test_command_chain_dispatcher_ff

tests/test_hooks.py:45–56  ·  view source on GitHub ↗

Test two failing hooks

()

Source from the content-addressed store, hash-verified

43
44
45def 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
59def test_command_chain_dispatcher_fofo():

Callers

nothing calls this directly

Calls 2

FailClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…