MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / test_check_function_def_args

Function test_check_function_def_args

tests/test_check_function_def.py:120–131  ·  view source on GitHub ↗
(stu, passes)

Source from the content-addressed store, hash-verified

118 ],
119)
120def test_check_function_def_args(stu, passes):
121 s = setup_state(stu, "def f(a, b = 3): pass")
122 with helper.verify_sct(passes):
123 s.check_function_def("f").multi(
124 check_args(0)
125 .has_equal_part("name", msg="wrong")
126 .has_equal_part("is_default", msg="wrong"),
127 check_args(1)
128 .has_equal_part("name", msg="wrong")
129 .has_equal_part("is_default", msg="wrong")
130 .has_equal_value(),
131 )
132
133
134@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

setup_stateFunction · 0.90
check_argsFunction · 0.85

Tested by

no test coverage detected