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

Function test_check_object_custom_compare

tests/test_check_object.py:64–72  ·  view source on GitHub ↗
(stu_code, passes)

Source from the content-addressed store, hash-verified

62 "stu_code, passes", [("x = [1, 2, 3]", True), ("x = [1, 2, 3, 4]", False)]
63)
64def test_check_object_custom_compare(stu_code, passes):
65 output = helper.run(
66 {
67 "DC_SOLUTION": "x = [4, 5, 6]",
68 "DC_CODE": stu_code,
69 "DC_SCT": 'Ex().check_object("x").has_equal_value(func = lambda x,y: len(x) == len(y))',
70 }
71 )
72 assert output["correct"] == passes
73
74
75def test_check_object_single_process():

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected