Skip to content

Commit f5ba217

Browse files
mzuennimpsijm
authored andcommitted
use more absolute
1 parent 5030bc0 commit f5ba217

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
@@ -50,9 +50,9 @@ def get_validator_command():
5050
return (
5151
output_validator.run_command
5252
+ [
53-
run.in_path.resolve(),
54-
run.testcase.ans_path.resolve(),
55-
run.feedbackdir.resolve(),
53+
run.in_path.absolute(),
54+
run.testcase.ans_path.absolute(),
55+
run.feedbackdir.absolute(),
5656
]
5757
+ run.testcase.testdata_yaml_validator_args(
5858
output_validator,

bin/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ def ensure_symlink(link: Path, target: Path, output: bool = False, relative: boo
948948
# Use os.path.relpath instead of Path.relative_to for non-subdirectories.
949949
link.symlink_to(os.path.relpath(target, link.parent), target.is_dir())
950950
else:
951-
link.symlink_to(target.resolve(), target.is_dir())
951+
link.symlink_to(target.absolute(), target.is_dir())
952952

953953

954954
def has_substitute(

bin/validate.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def format_exec_code_map(returncode):
183183
if self.language == "viva":
184184
# Called as `viva validator.viva testcase.in`.
185185
result = self._exec_command(
186-
self.run_command + [main_path.resolve()],
186+
self.run_command + [main_path.absolute()],
187187
exec_code_map=format_exec_code_map,
188188
cwd=cwd,
189189
)
@@ -312,7 +312,7 @@ def run(
312312
if self.language in Validator.FORMAT_VALIDATOR_LANGUAGES:
313313
return Validator._run_format_validator(self, testcase, cwd)
314314

315-
invocation = self.run_command + [testcase.in_path.resolve()]
315+
invocation = self.run_command + [testcase.in_path.absolute()]
316316

317317
with testcase.ans_path.open() as ans_file:
318318
ret = self._exec_helper(
@@ -368,8 +368,8 @@ def run(
368368
if mode == Mode.INPUT:
369369
raise ValueError("OutputValidator do not support Mode.INPUT")
370370

371-
in_path = testcase.in_path.resolve()
372-
ans_path = testcase.ans_path.resolve()
371+
in_path = testcase.in_path.absolute()
372+
ans_path = testcase.ans_path.absolute()
373373
if mode == Mode.ANSWER:
374374
path = ans_path
375375
elif mode == Mode.INVALID:
@@ -378,10 +378,10 @@ def run(
378378
"OutputValidator in Mode.INVALID should only be run for data/invalid_output"
379379
)
380380
assert testcase.out_path is not None
381-
path = testcase.out_path.resolve()
381+
path = testcase.out_path.absolute()
382382
elif mode == Mode.VALID_OUTPUT:
383383
assert testcase.out_path is not None
384-
path = testcase.out_path.resolve()
384+
path = testcase.out_path.absolute()
385385
else:
386386
assert mode != Mode.INPUT
387387
# mode is actually a Run

0 commit comments

Comments
 (0)