Fix: list_generator pass doctests
This commit is contained in:
parent
87b6b3ca27
commit
5d909a5f81
@ -47,11 +47,11 @@ def list_generator(var_list:list[str], conditions:list[str]=[], global_config:di
|
|||||||
True
|
True
|
||||||
>>> c not in [2, 3, 5, 7]
|
>>> c not in [2, 3, 5, 7]
|
||||||
True
|
True
|
||||||
>>> a, ab, b, c = list_generator(["a", "a*b", "b", "c"], configs={"a": {"rejected": [2, 3, 5, 7]})
|
>>> a, ab, b, c = list_generator(["a", "a*b", "b", "c"], configs={"a": {"rejected": [2, 3, 5, 7]}})
|
||||||
>>> a not in [2, 3, 5, 7]
|
>>> a not in [2, 3, 5, 7]
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
rv = extract_letters(var_list)
|
rv = extract_letters(var_list)
|
||||||
rv_gen = random_generator(rv, conditions, dict(DEFAUTL_CONFIG, **global_config), variables_scope)
|
rv_gen = random_generator(rv, conditions, dict(DEFAUTL_CONFIG, **global_config), configs)
|
||||||
generated = eval_words(var_list, rv_gen)
|
generated = eval_words(var_list, rv_gen)
|
||||||
return [generated[v] for v in var_list]
|
return [generated[v] for v in var_list]
|
||||||
|
Loading…
Reference in New Issue
Block a user