def test_apply_all_link_refs_with_incorrect_args(bytecode, link_refs,
                                                 attr_dict):
    with pytest.raises(BytecodeLinkingError):
        apply_all_link_refs(bytecode, link_refs, attr_dict)
def test_apply_all_link_refs(bytecode, link_refs, attr_dict, expected):
    actual = apply_all_link_refs(bytecode, link_refs, attr_dict)
    assert actual == expected