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

Function test_run_relative_working_dir

tests/test_local.py:105–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104
105def test_run_relative_working_dir():
106 stu_code = 'from pathlib import Path; c = Path("c").read_text(encoding="utf-8")'
107 sol_code = """c = 'c= Path("c").read_text(encoding="utf-8")'"""
108
109 file_dir = "a/b"
110 file_path = "a/b/c"
111
112 with in_temp_dir():
113
114 write_file(file_dir, "c", stu_code)
115
116 chain = setup_state("", "", pec="")
117
118 child = chain.check_file(file_path, solution_code=sol_code)
119
120 child.run(file_dir).check_object("c")
121 child.run().check_object("c")
122
123
124def test_run_solution_dir():

Callers

nothing calls this directly

Calls 4

in_temp_dirFunction · 0.90
setup_stateFunction · 0.90
write_fileFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected