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)
| 534 | |
| 535 | |
| 536 | def 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"]) |
nothing calls this directly
no test coverage detected