summaryrefslogtreecommitdiff
path: root/yaksh/evaluator_tests/test_scilab_evaluation.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2018-06-07 16:14:37 +0530
committerGitHub2018-06-07 16:14:37 +0530
commit4eb754c2e71922819de7390d1b4993a21763de3e (patch)
treefede3f4250f3711d31da4bb7edd262edd0a90727 /yaksh/evaluator_tests/test_scilab_evaluation.py
parent78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (diff)
parent93bb10eae5e1364ae6492f2534f0e7864c9c4254 (diff)
downloadonline_test-4eb754c2e71922819de7390d1b4993a21763de3e.tar.gz
online_test-4eb754c2e71922819de7390d1b4993a21763de3e.tar.bz2
online_test-4eb754c2e71922819de7390d1b4993a21763de3e.zip
Merge pull request #482 from adityacp/pep8_changes
Pep8 changes
Diffstat (limited to 'yaksh/evaluator_tests/test_scilab_evaluation.py')
-rw-r--r--yaksh/evaluator_tests/test_scilab_evaluation.py27
1 files changed, 11 insertions, 16 deletions
diff --git a/yaksh/evaluator_tests/test_scilab_evaluation.py b/yaksh/evaluator_tests/test_scilab_evaluation.py
index f7a9925..d3f1dc8 100644
--- a/yaksh/evaluator_tests/test_scilab_evaluation.py
+++ b/yaksh/evaluator_tests/test_scilab_evaluation.py
@@ -6,12 +6,12 @@ import tempfile
from psutil import Process
from textwrap import dedent
-#Local Import
+# Local Import
from yaksh import grader as gd
from yaksh.grader import Grader
-from yaksh.scilab_code_evaluator import ScilabCodeEvaluator
from yaksh.evaluator_tests.test_python_evaluation import EvaluatorBaseTest
+
class ScilabEvaluationTestCases(EvaluatorBaseTest):
def setUp(self):
tmp_in_dir_path = tempfile.mkdtemp()
@@ -54,7 +54,7 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest):
self.file_paths = None
gd.SERVER_TIMEOUT = 9
self.timeout_msg = ("Code took more than {0} seconds to run. "
- "You probably have an infinite loop"
+ "You probably have an infinite loop"
" in your code.").format(gd.SERVER_TIMEOUT)
def tearDown(self):
@@ -63,15 +63,14 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest):
def test_correct_answer(self):
user_answer = ("funcprot(0)\nfunction[c]=add(a,b)"
- "\n\tc=a+b;\nendfunction")
+ "\n\tc=a+b;\nendfunction")
kwargs = {
'metadata': {
'user_answer': user_answer,
'file_paths': self.file_paths,
'partial_grading': False,
'language': 'scilab'
- },
- 'test_case_data': self.test_case_data,
+ }, 'test_case_data': self.test_case_data,
}
grader = Grader(self.in_dir)
@@ -81,15 +80,14 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest):
def test_error(self):
user_answer = ("funcprot(0)\nfunction[c]=add(a,b)"
- "\n\tc=a+b;\ndis(\tendfunction")
+ "\n\tc=a+b;\ndis(\tendfunction")
kwargs = {
'metadata': {
'user_answer': user_answer,
'file_paths': self.file_paths,
'partial_grading': False,
'language': 'scilab'
- },
- 'test_case_data': self.test_case_data,
+ }, 'test_case_data': self.test_case_data,
}
grader = Grader(self.in_dir)
@@ -98,18 +96,16 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest):
self.assertFalse(result.get("success"))
self.assert_correct_output('error', result.get("error"))
-
def test_incorrect_answer(self):
user_answer = ("funcprot(0)\nfunction[c]=add(a,b)"
- "\n\tc=a-b;\nendfunction")
+ "\n\tc=a-b;\nendfunction")
kwargs = {
'metadata': {
'user_answer': user_answer,
'file_paths': self.file_paths,
'partial_grading': False,
'language': 'scilab'
- },
- 'test_case_data': self.test_case_data,
+ }, 'test_case_data': self.test_case_data,
}
grader = Grader(self.in_dir)
@@ -122,15 +118,14 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest):
def test_infinite_loop(self):
user_answer = ("funcprot(0)\nfunction[c]=add(a,b)"
- "\n\tc=a;\nwhile(1==1)\nend\nendfunction")
+ "\n\tc=a;\nwhile(1==1)\nend\nendfunction")
kwargs = {
'metadata': {
'user_answer': user_answer,
'file_paths': self.file_paths,
'partial_grading': False,
'language': 'scilab'
- },
- 'test_case_data': self.test_case_data,
+ }, 'test_case_data': self.test_case_data,
}
grader = Grader(self.in_dir)