MCPcopy Create free account
hub / github.com/datacamp/pythonwhat / arg_test

Function arg_test

pythonwhat/test_funcs/test_function.py:14–25  ·  view source on GitHub ↗
(state, name, do_eval, missing_msg, incorrect_msg)

Source from the content-addressed store, hash-verified

12
13
14def arg_test(state, name, do_eval, missing_msg, incorrect_msg):
15 arg_state = check_args(state, name=name, missing_msg=missing_msg)
16
17 append = incorrect_msg is None
18
19 if isinstance(do_eval, bool):
20 if do_eval:
21 has_equal_value(
22 arg_state, incorrect_msg=incorrect_msg, append=append, copy=False
23 )
24 else:
25 has_equal_ast(arg_state, incorrect_msg=incorrect_msg, append=append)
26
27
28def test_function(

Callers 1

test_function_v2Function · 0.85

Calls 2

check_argsFunction · 0.90
has_equal_astFunction · 0.90

Tested by

no test coverage detected