示例#1
0
def test_process_args_iterable_kwargs(d):
    kwargs = {rand_string(): rand_string() for _ in rand_len()}
    it = [(rand_string(), rand_string()) for _ in rand_len()]
    res = list(d._process_args(it, **kwargs))
    assert find(it, res)
    assert find(kwargs.items(), res)
示例#2
0
def test_process_args_iterable(d):
    it = [(rand_string(), rand_string()) for _ in rand_len()]
    res = list(d._process_args(it))
    assert find(it, res)
示例#3
0
def test_process_args_prehased_kwargs(d):
    d1 = PrehashedDict({rand_string(): rand_string() for _ in rand_len()})
    kwargs = {rand_string(): rand_string() for _ in rand_len()}
    res = list(d._process_args(d1, **kwargs))
    assert find(d1.items(), res, hash_me=False)
    assert find(kwargs.items(), res)
示例#4
0
def test_process_args_dict_kwargs(d):
    dic = {rand_string(): rand_string() for _ in rand_len()}
    kwargs = {rand_string(): rand_string() for _ in rand_len()}
    res = list(d._process_args(dic, **kwargs))
    assert find(dic.items(), res)
    assert find(kwargs.items(), res)
示例#5
0
def test_process_args_kwargs(d):
    kwargs = {rand_string(): rand_string() for _ in rand_len()}
    print(kwargs)
    res = list(d._process_args(**kwargs))
    assert find(kwargs.items(), res)
示例#6
0
def test_process_args_none(d):
    res = list(d._process_args())
    assert not res