Skip to content

Commit c5f7339

Browse files
mzuennimpsijm
authored andcommitted
use more absolute
1 parent e506982 commit c5f7339

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
@@ -52,9 +52,9 @@ def get_validator_command():
5252
return (
5353
output_validator.run_command
5454
+ [
55-
run.in_path.resolve(),
56-
run.testcase.ans_path.resolve(),
57-
run.feedbackdir.resolve(),
55+
run.in_path.absolute(),
56+
run.testcase.ans_path.absolute(),
57+
run.feedbackdir.absolute(),
5858
]
5959
+ run.testcase.testdata_yaml_args(
6060
output_validator,

bin/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ def ensure_symlink(link: Path, target: Path, output: bool = False, relative: boo
10281028
# Use os.path.relpath instead of Path.relative_to for non-subdirectories.
10291029
link.symlink_to(os.path.relpath(target, link.parent), target.is_dir())
10301030
else:
1031-
link.symlink_to(target.resolve(), target.is_dir())
1031+
link.symlink_to(target.absolute(), target.is_dir())
10321032
return True
10331033
except (FileNotFoundError, FileExistsError):
10341034
# 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)