MCPcopy Create free account
hub / github.com/dot-agent/nextpy / test_get_hooks_nested2

Function test_get_hooks_nested2

tests/components/test_component.py:536–553  ·  view source on GitHub ↗

Test that a component returns both when parent and child have hooks. Args: component3: component with hooks defined. component4: component with different hooks defined.

(component3, component4)

Source from the content-addressed store, hash-verified

534
535
536def test_get_hooks_nested2(component3, component4):
537 """Test that a component returns both when parent and child have hooks.
538
539 Args:
540 component3: component with hooks defined.
541 component4: component with different hooks defined.
542 """
543 exp_hooks = component3().get_hooks().union(component4().get_hooks())
544 assert component3.create(component4.create()).get_hooks() == exp_hooks
545 assert component4.create(component3.create()).get_hooks() == exp_hooks
546 assert (
547 component4.create(
548 component3.create(),
549 component4.create(),
550 component3.create(),
551 ).get_hooks()
552 == exp_hooks
553 )
554
555
556@pytest.mark.parametrize("fixture", ["component5", "component6"])

Callers

nothing calls this directly

Calls 4

component3Function · 0.85
component4Function · 0.85
get_hooksMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected