Skip to content

Commit

Permalink
Fix tests & edge cases
Browse files Browse the repository at this point in the history
There were some edge cases that needed to be fixed, in addition to a lot
of tests that needed to be adjusted for strict text checking.
  • Loading branch information
niknetniko committed Jan 5, 2024
1 parent 14efbfb commit 3c7ae92
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 183 deletions.
2 changes: 1 addition & 1 deletion tested/judge/planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PlannedExecutionUnit:

def get_stdin(self, resources: Path) -> str:
potential = [c.context.get_stdin(resources) for c in self.contexts]
return "\n".join(p for p in potential if p)
return "".join(p for p in potential if p)

def has_main_testcase(self) -> bool:
return self.contexts[0].context.has_main_testcase()
Expand Down
4 changes: 2 additions & 2 deletions tested/oracles/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def compare_text(options: dict[str, Any], expected: str, actual: str) -> OracleR

if (
options["tryFloatingPoint"]
and (actual_float := _is_number(actual_eval)) is not None
and (actual_float := _is_number(actual_eval.strip())) is not None
):
expected_float = float(expected_eval)
expected_float = float(expected_eval.strip())
if options["applyRounding"]:
numbers = int(options["roundTo"])
# noinspection PyUnboundLocalVariable
Expand Down
Loading

0 comments on commit 3c7ae92

Please sign in to comment.