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/grader.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/grader.py')
-rw-r--r-- | yaksh/grader.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/yaksh/grader.py b/yaksh/grader.py index 320e7e7..de8f897 100644 --- a/yaksh/grader.py +++ b/yaksh/grader.py @@ -23,6 +23,13 @@ class TimeoutException(Exception): pass +class CompilationError(Exception): + pass + + +class TestCaseError(Exception): + pass + @contextlib.contextmanager def change_dir(path): cur_dir = abspath(dirname(MY_DIR)) |