Skip to content

Commit

Permalink
Small fixes in run plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofachada committed Mar 26, 2023
1 parent 9c6c536 commit dde69f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions egrader/plugins/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def assess_run_command(
input_stream: str | None = None,
expect_exit_code: int = 0,
expect_output: str | None = None,
timeout: float = 0.5,
timeout: float = 2.5,
) -> float:
"""Run a command and check for exit code and/or expected output."""
try:
Expand All @@ -102,8 +102,6 @@ def assess_run_command(
except (TimeoutExpired, FileNotFoundError):
return 0

print(r)

if expect_exit_code != r.returncode:
return 0

Expand Down
2 changes: 1 addition & 1 deletion examples/rules_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
weight: 0.2
params:
command: python -c "x=input();print(x)"
input: this is the expected string
input_stream: this is the expected string
expect_output: this is the expected string
- repo: LP1Semana01
weight: 10
Expand Down

0 comments on commit dde69f1

Please sign in to comment.