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

Function run_exercise

pythonwhat/local.py:190–197  ·  view source on GitHub ↗
(pec, sol_code, stu_code, sol_wd=None, stu_wd=None, **kwargs)

Source from the content-addressed store, hash-verified

188
189
190def run_exercise(pec, sol_code, stu_code, sol_wd=None, stu_wd=None, **kwargs):
191 with ChDir(sol_wd or os.getcwd()):
192 sol_process, _, _ = run_single_process(pec, sol_code, **kwargs)
193
194 with ChDir(stu_wd or os.getcwd()):
195 stu_process, raw_stu_output, error = run_single_process(pec, stu_code, **kwargs)
196
197 return sol_process, stu_process, raw_stu_output, error
198
199
200# todo:

Callers 3

setup_stateFunction · 0.90
runFunction · 0.90
runFunction · 0.85

Calls 2

ChDirClass · 0.85
run_single_processFunction · 0.85

Tested by 1

setup_stateFunction · 0.72