Skip to content

Commit a03bf54

Browse files
committed
use more absolute
1 parent f888d06 commit a03bf54

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

bin/interactive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def get_validator_command():
5454
return (
5555
output_validator.run_command
5656
+ [
57-
run.in_path.resolve(),
58-
run.testcase.ans_path.resolve(),
59-
run.feedbackdir.resolve(),
57+
run.in_path.absolute(),
58+
run.testcase.ans_path.absolute(),
59+
run.feedbackdir.absolute(),
6060
]
6161
+ run.testcase.test_case_yaml_args(
6262
output_validator,

bin/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ def ensure_symlink(link: Path, target: Path, output: bool = False, relative: boo
10261026
# Use os.path.relpath instead of Path.relative_to for non-subdirectories.
10271027
link.symlink_to(os.path.relpath(target, link.parent), target.is_dir())
10281028
else:
1029-
link.symlink_to(target.resolve(), target.is_dir())
1029+
link.symlink_to(target.absolute(), target.is_dir())
10301030
return True
10311031
except (FileNotFoundError, FileExistsError):
10321032
# this must be a race condition

bin/validate.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def format_exec_code_map(returncode):
185185
if self.language == "viva":
186186
# Called as `viva validator.viva testcase.in`.
187187
result = self._exec_command(
188-
self.run_command + [main_path.resolve()],
188+
self.run_command + [main_path.absolute()],
189189
exec_code_map=format_exec_code_map,
190190
cwd=cwd,
191191
)
@@ -319,7 +319,7 @@ def run(
319319
if self.language in Validator.FORMAT_VALIDATOR_LANGUAGES:
320320
return Validator._run_format_validator(self, testcase, cwd)
321321

322-
invocation = self.run_command + [testcase.in_path.resolve()]
322+
invocation = self.run_command + [testcase.in_path.absolute()]
323323

324324
with testcase.ans_path.open("rb") as ans_file:
325325
ret = self._exec_helper(
@@ -377,8 +377,8 @@ def run(
377377
if mode == Mode.INPUT:
378378
raise ValueError("OutputValidator does not support Mode.INPUT")
379379

380-
in_path = testcase.in_path.resolve()
381-
ans_path = testcase.ans_path.resolve()
380+
in_path = testcase.in_path.absolute()
381+
ans_path = testcase.ans_path.absolute()
382382
if mode == Mode.ANSWER:
383383
path = ans_path
384384
elif mode == Mode.INVALID:
@@ -387,10 +387,10 @@ def run(
387387
"OutputValidator in Mode.INVALID should only be run for data/invalid_output"
388388
)
389389
assert testcase.out_path is not None
390-
path = testcase.out_path.resolve()
390+
path = testcase.out_path.absolute()
391391
elif mode == Mode.VALID_OUTPUT:
392392
assert testcase.out_path is not None
393-
path = testcase.out_path.resolve()
393+
path = testcase.out_path.absolute()
394394
else:
395395
assert mode != Mode.INPUT
396396
# mode is actually a Run

0 commit comments

Comments
 (0)