diff options
author | maheshgudi | 2018-07-04 16:34:56 +0530 |
---|---|---|
committer | maheshgudi | 2018-07-12 18:27:27 +0530 |
commit | 99f0c944fafec51b9327fe5dea01096842788e03 (patch) | |
tree | ec3586b1fca3f48c97bb24b131451677bea7a856 /yaksh/java_stdio_evaluator.py | |
parent | a850749942d163f9aedb19a1d19c4b8d7016745d (diff) | |
download | online_test-99f0c944fafec51b9327fe5dea01096842788e03.tar.gz online_test-99f0c944fafec51b9327fe5dea01096842788e03.tar.bz2 online_test-99f0c944fafec51b9327fe5dea01096842788e03.zip |
Raise appropriate exceptions for C and Java language to the Grader
- Raise AssertionError,CompilationError and TestCaseError for assertion, user answer compilation
and testcase compilation errors respectively.
- Add test case for C/C++ and Java
Diffstat (limited to 'yaksh/java_stdio_evaluator.py')
-rw-r--r-- | yaksh/java_stdio_evaluator.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yaksh/java_stdio_evaluator.py b/yaksh/java_stdio_evaluator.py index 0504177..89f9fc4 100644 --- a/yaksh/java_stdio_evaluator.py +++ b/yaksh/java_stdio_evaluator.py @@ -7,6 +7,7 @@ from os.path import isfile # Local imports from .stdio_evaluator import StdIOEvaluator from .file_utils import copy_files, delete_files +from .grader import CompilationError class JavaStdIOEvaluator(StdIOEvaluator): @@ -86,5 +87,6 @@ class JavaStdIOEvaluator(StdIOEvaluator): err = err + "\n" + e except Exception: err = err + "\n" + stdnt_stderr + raise CompilationError(err) mark_fraction = 1.0 if self.partial_grading and success else 0.0 return success, err, mark_fraction |