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

Function test_is_instance

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

Source from the content-addressed store, hash-verified

81 "stu_code, passes", [("arr = 4", False), ("arr = np.array([1])", True)]
82)
83def test_is_instance(stu_code, passes):
84 output = helper.run(
85 {
86 "DC_PEC": "import numpy as np",
87 "DC_SOLUTION": "arr = np.array([1, 2, 3, 4])",
88 "DC_SCT": "import numpy; Ex().check_object('arr').is_instance(numpy.ndarray)",
89 "DC_CODE": stu_code,
90 }
91 )
92 assert output["correct"] == passes
93
94
95@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected