summaryrefslogtreecommitdiff
path: root/testapp/code_server.py
diff options
context:
space:
mode:
authorprathamesh2013-07-02 12:25:33 +0530
committerprathamesh2013-07-02 12:25:33 +0530
commit8a3016a88af5c4a09e8b5683f1e305e9100f3562 (patch)
treec5878e30b59ee084f6b5fd6c5f3e98a097e4960e /testapp/code_server.py
parent33366bfa87d62d433cc7541e4699b61be78e5024 (diff)
downloadonline_test-8a3016a88af5c4a09e8b5683f1e305e9100f3562.tar.gz
online_test-8a3016a88af5c4a09e8b5683f1e305e9100f3562.tar.bz2
online_test-8a3016a88af5c4a09e8b5683f1e305e9100f3562.zip
c files moved
Diffstat (limited to 'testapp/code_server.py')
-rwxr-xr-xtestapp/code_server.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testapp/code_server.py b/testapp/code_server.py
index ad15501..2fdd11f 100755
--- a/testapp/code_server.py
+++ b/testapp/code_server.py
@@ -252,7 +252,7 @@ class CodeServer(object):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
proc, stdnt_stdout, stdnt_stderr = ret
- if inst_stdout in stdnt_stdout:
+ if inst_stdout == stdnt_stdout:
return True, 'Correct answer'
else:
err = "Error: expected %s, got %s" % (inst_stderr,
@@ -284,7 +284,7 @@ class CodeServer(object):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
proc, stdnt_stdout, stdnt_stderr = ret
- valid_answer = inst_stdout in stdnt_stdout
+ valid_answer = inst_stdout == stdnt_stdout
if valid_answer and (num_lines == loop_count):
return True, "Correct answer"
else:
@@ -293,7 +293,7 @@ class CodeServer(object):
return False, err
def run_c_code(self, answer, test_code, in_dir=None):
- """Tests given C code (`answer`) with the `test_code` supplied.
+ """Tests given C code<F12> (`answer`) with the `test_code` supplied.
The testcode is a path to the reference code.
The reference code will call the function submitted by the student.