summaryrefslogtreecommitdiff
path: root/yaksh/code_evaluator.py
diff options
context:
space:
mode:
authorankitjavalkar2016-09-27 15:08:18 +0530
committerankitjavalkar2016-09-30 10:36:25 +0530
commit6b6e58b06bd49e36edd87a027c08d223571a0c0b (patch)
tree0395d79de3f06204309d933415e38bc215e231f6 /yaksh/code_evaluator.py
parentac8d6720bc75676e05462cc38ad144d5aedc14e7 (diff)
downloadonline_test-6b6e58b06bd49e36edd87a027c08d223571a0c0b.tar.gz
online_test-6b6e58b06bd49e36edd87a027c08d223571a0c0b.tar.bz2
online_test-6b6e58b06bd49e36edd87a027c08d223571a0c0b.zip
Fix test cases and corresponding changes in evaluators for Python 2/3 compatibility
Diffstat (limited to 'yaksh/code_evaluator.py')
-rw-r--r--yaksh/code_evaluator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/code_evaluator.py b/yaksh/code_evaluator.py
index a55aed3..b4740c0 100644
--- a/yaksh/code_evaluator.py
+++ b/yaksh/code_evaluator.py
@@ -135,6 +135,7 @@ class CodeEvaluator(object):
def teardown(self):
# Cancel the signal
delete_signal_handler()
+ self._change_dir(MY_DIR)
def check_code(self):
raise NotImplementedError("check_code method not implemented")
@@ -184,7 +185,7 @@ class CodeEvaluator(object):
proc.kill()
# Re-raise exception.
raise
- return proc, stdout, stderr
+ return proc, stdout.decode('utf-8'), stderr.decode('utf-8')
def _change_dir(self, in_dir):
if in_dir is not None and isdir(in_dir):