Beispiel #1
0
def TestOneInput(data):
    if len(data) < 10:
        return
    fdp = atheris.FuzzedDataProvider(data)
    fuzzed_dict = get_fuse_dict(data)
    if len(fuzzed_dict) == 0:
        return

    if fdp.ConsumeBool():
        fuse(fuzzed_dict, rename_keys=fdp.ConsumeBool())
    else:
        fuse_linear(fuzzed_dict, rename_keys=fdp.ConsumeBool())
Beispiel #2
0
def fuse2(*args, **kwargs):
    """Run both ``fuse`` and ``fuse_linear`` and compare results"""
    rv1 = fuse_linear(*args, **kwargs)
    if kwargs.get("rename_keys") is not False:
        return rv1
    rv2 = fuse(*args, **kwargs)
    assert rv1 == rv2
    return rv1
def fuse2(*args, **kwargs):
    """Run both ``fuse`` and ``fuse_linear`` and compare results"""
    rv1 = fuse_linear(*args, **kwargs)
    if kwargs.get('rename_keys') is not False:
        return rv1
    rv2 = fuse(*args, **kwargs)
    assert rv1 == rv2
    return rv1