summaryrefslogtreecommitdiff
path: root/yaksh/java_code_evaluator.py
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-07-02 13:28:48 +0530
committerGitHub2020-07-02 13:28:48 +0530
commitb541b3aa05bf19ed6d4d28373e186883e3c4e966 (patch)
tree2d0b95b53a60ce6830fcefe115830e89e940845a /yaksh/java_code_evaluator.py
parentc9e0d0df8dcb3a14017cef5ff01832a5345629db (diff)
parent46ef4a4a563b16bb96d09cb17496afb731e616ad (diff)
downloadonline_test-b541b3aa05bf19ed6d4d28373e186883e3c4e966.tar.gz
online_test-b541b3aa05bf19ed6d4d28373e186883e3c4e966.tar.bz2
online_test-b541b3aa05bf19ed6d4d28373e186883e3c4e966.zip
Merge pull request #719 from prathamesh920/hidden-testcases
Hide test cases
Diffstat (limited to 'yaksh/java_code_evaluator.py')
-rw-r--r--yaksh/java_code_evaluator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/java_code_evaluator.py b/yaksh/java_code_evaluator.py
index 35573c0..9689c25 100644
--- a/yaksh/java_code_evaluator.py
+++ b/yaksh/java_code_evaluator.py
@@ -8,6 +8,7 @@ import subprocess
from .base_evaluator import BaseEvaluator
from .file_utils import copy_files, delete_files
from .grader import CompilationError, TestCaseError
+from .error_messages import prettify_exceptions
class JavaCodeEvaluator(BaseEvaluator):
@@ -27,6 +28,7 @@ class JavaCodeEvaluator(BaseEvaluator):
# Set test case data values
self.test_case = test_case_data.get('test_case')
self.weight = test_case_data.get('weight')
+ self.hidden = test_case_data.get('hidden')
def teardown(self):
# Delete the created file.
@@ -150,7 +152,8 @@ class JavaCodeEvaluator(BaseEvaluator):
mark_fraction = 1.0 if self.partial_grading else 0.0
else:
err = stdout + "\n" + stderr
- raise AssertionError(err)
+ err = prettify_exceptions('AssertionError', err)
+ return success, err, mark_fraction
else:
err = "Test case Error:"
try: