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)
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)
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)
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)
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)
def test_process_args_none(d): res = list(d._process_args()) assert not res