()
| 144 | |
| 145 | |
| 146 | def test_run_with_absolute_dir(): |
| 147 | code = 'from pathlib import Path; c = Path("c").read_text(encoding="utf-8")' |
| 148 | |
| 149 | file_dir = "a/b" |
| 150 | solution_location = "solution" |
| 151 | workspace_location = "workspace" |
| 152 | |
| 153 | with in_temp_dir(): |
| 154 | os.makedirs(file_dir) |
| 155 | with ChDir(file_dir): |
| 156 | abs_dir = os.path.abspath(".") |
| 157 | abs_file_path = Path(abs_dir, "c") |
| 158 | with open("c", "w") as f: |
| 159 | f.write(code) |
| 160 | |
| 161 | write_file(solution_location, "c", code) |
| 162 | |
| 163 | os.makedirs(workspace_location) |
| 164 | with ChDir(workspace_location): |
| 165 | chain = setup_state("", "", pec="") |
| 166 | |
| 167 | child = chain.check_file(abs_file_path, solution_code=code) |
| 168 | |
| 169 | child.run(abs_dir).check_object("c") |
| 170 | child.run().check_object("c") |
| 171 | |
| 172 | |
| 173 | def test_run_custom_solution_dir(): |
nothing calls this directly
no test coverage detected