diff options
author | ankitjavalkar | 2016-12-19 19:18:35 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-12-20 12:46:04 +0530 |
commit | 4a0f94084bc26559ef3e26470619e87314f9d70e (patch) | |
tree | c94e56cbb84a90fe12f910bb83a36583219892ee /yaksh/evaluator_tests | |
parent | 81d373983806b78d651e17b966bae0a8ccf3c4bb (diff) | |
download | online_test-4a0f94084bc26559ef3e26470619e87314f9d70e.tar.gz online_test-4a0f94084bc26559ef3e26470619e87314f9d70e.tar.bz2 online_test-4a0f94084bc26559ef3e26470619e87314f9d70e.zip |
Remove commented code
Diffstat (limited to 'yaksh/evaluator_tests')
-rw-r--r-- | yaksh/evaluator_tests/test_bash_evaluation.py | 52 | ||||
-rw-r--r-- | yaksh/evaluator_tests/test_c_cpp_evaluation.py | 116 | ||||
-rw-r--r-- | yaksh/evaluator_tests/test_java_evaluation.py | 86 | ||||
-rw-r--r-- | yaksh/evaluator_tests/test_python_evaluation.py | 88 | ||||
-rw-r--r-- | yaksh/evaluator_tests/test_scilab_evaluation.py | 28 |
5 files changed, 0 insertions, 370 deletions
diff --git a/yaksh/evaluator_tests/test_bash_evaluation.py b/yaksh/evaluator_tests/test_bash_evaluation.py index 8888ee6..142d7f0 100644 --- a/yaksh/evaluator_tests/test_bash_evaluation.py +++ b/yaksh/evaluator_tests/test_bash_evaluation.py @@ -34,13 +34,6 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): user_answer = ("#!/bin/bash\n[[ $# -eq 2 ]]" " && echo $(( $1 + $2 )) && exit $(( $1 + $2 ))" ) - # get_class = BashCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -60,13 +53,6 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): def test_error(self): user_answer = ("#!/bin/bash\n[[ $# -eq 2 ]] " "&& echo $(( $1 - $2 )) && exit $(( $1 - $2 ))") - # get_class = BashCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -86,13 +72,6 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): def test_infinite_loop(self): user_answer = ("#!/bin/bash\nwhile [ 1 ] ;" " do echo "" > /dev/null ; done") - # get_class = BashCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -118,13 +97,6 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): } ] user_answer = ("#!/bin/bash\ncat $1") - # get_class = BashCodeEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -162,12 +134,6 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_type': 'stdiobasedtestcase', 'weight': 0.0 }] - # get_class = BashStdioEvaluator() - # kwargs = {"user_answer": user_answer, - # "partial_grading": True, - # "test_case_data": test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -198,12 +164,6 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_type': 'stdiobasedtestcase', 'weight': 0.0 }] - # get_class = BashStdioEvaluator() - # kwargs = {"user_answer": user_answer, - # "partial_grading": True, - # "test_case_data": test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -232,12 +192,6 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_type': 'stdiobasedtestcase', 'weight': 0.0 }] - # get_class = BashStdioEvaluator() - # kwargs = {"user_answer": user_answer, - # "partial_grading": True, - # "test_case_data": test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -265,12 +219,6 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_type': 'stdiobasedtestcase', 'weight': 0.0 }] - # get_class = BashStdioEvaluator() - # kwargs = {"user_answer": user_answer, - # "partial_grading": True, - # "test_case_data": test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, diff --git a/yaksh/evaluator_tests/test_c_cpp_evaluation.py b/yaksh/evaluator_tests/test_c_cpp_evaluation.py index 9080e88..4dd6a2f 100644 --- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py +++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py @@ -34,12 +34,6 @@ class CAssertionEvaluationTestCases(unittest.TestCase): def test_correct_answer(self): user_answer = "int add(int a, int b)\n{return a+b;}" - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -58,12 +52,6 @@ class CAssertionEvaluationTestCases(unittest.TestCase): def test_incorrect_answer(self): user_answer = "int add(int a, int b)\n{return a-b;}" - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -84,12 +72,6 @@ class CAssertionEvaluationTestCases(unittest.TestCase): def test_compilation_error(self): user_answer = "int add(int a, int b)\n{return a+b}" - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -108,13 +90,6 @@ class CAssertionEvaluationTestCases(unittest.TestCase): def test_infinite_loop(self): user_answer = "int add(int a, int b)\n{while(1>0){}}" - # get_class = CppCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -149,13 +124,6 @@ class CAssertionEvaluationTestCases(unittest.TestCase): return buff[0]; } """) - # get_class = CppCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -193,12 +161,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): scanf("%d%d",&a,&b); printf("%d",a+b); }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -230,12 +192,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): for(i=0;i<3;i++){ printf("%d",a[i]);} }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -265,12 +221,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): scanf("%s",a); printf("%s",a); }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -294,12 +244,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): int a=10; printf("%d",a); }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -325,12 +269,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): int a=10; printf("%d",a) }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -354,12 +292,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): while(0==0){ printf("abc");} }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -388,12 +320,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): int a=5,b=6; printf("%d",a+b); }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -419,12 +345,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): cin>>a>>b; cout<<a+b; }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -457,12 +377,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): for(i=0;i<3;i++){ cout<<a[i];} }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -493,12 +407,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): cin>>a; cout<<a; }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -523,12 +431,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): int a=10; cout<<a; }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -555,12 +457,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): int a=10; cout<<a }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -585,12 +481,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): while(0==0){ cout<<"abc";} }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -620,12 +510,6 @@ class CppStdioEvaluationTestCases(unittest.TestCase): int a=5,b=6; cout<<a+b; }""") - # get_class = CppStdioEvaluator() - # kwargs = {'user_answer': user_answer, - # 'partial_grading': False, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, diff --git a/yaksh/evaluator_tests/test_java_evaluation.py b/yaksh/evaluator_tests/test_java_evaluation.py index a66b6d6..246a3e5 100644 --- a/yaksh/evaluator_tests/test_java_evaluation.py +++ b/yaksh/evaluator_tests/test_java_evaluation.py @@ -36,14 +36,6 @@ class JavaAssertionEvaluationTestCases(unittest.TestCase): def test_correct_answer(self): user_answer = "class Test {\n\tint square_num(int a) {\n\treturn a*a;\n\t}\n}" - - # get_class = JavaCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -62,13 +54,6 @@ class JavaAssertionEvaluationTestCases(unittest.TestCase): def test_incorrect_answer(self): user_answer = "class Test {\n\tint square_num(int a) {\n\treturn a;\n\t}\n}" - # get_class = JavaCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -90,14 +75,6 @@ class JavaAssertionEvaluationTestCases(unittest.TestCase): def test_error(self): user_answer = "class Test {\n\tint square_num(int a) {\n\treturn a*a" - # get_class = JavaCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) - kwargs = { 'metadata': { 'user_answer': user_answer, @@ -116,13 +93,6 @@ class JavaAssertionEvaluationTestCases(unittest.TestCase): def test_infinite_loop(self): user_answer = "class Test {\n\tint square_num(int a) {\n\t\twhile(0==0){\n\t\t}\n\t}\n}" - # get_class = JavaCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -165,13 +135,6 @@ class JavaAssertionEvaluationTestCases(unittest.TestCase): br.close(); }}} """) - # get_class = JavaCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -220,12 +183,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): int b = s.nextInt(); System.out.print(a+b); }}""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -258,12 +215,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): a[i] = s.nextInt(); System.out.print(a[i]);} }}""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -290,12 +241,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): int b = s.nextInt(); System.out.print(a); }}""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -320,12 +265,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): { System.out.print("a"); }""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -351,12 +290,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): { System.out.print("a");} }}""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -386,12 +319,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): int b = 6; System.out.print(a+b); }}""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -423,12 +350,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): String b = s.nextLine(); System.out.print(a+b); }}""") - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -470,13 +391,6 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): br.close(); }}} """) - # get_class = JavaStdioEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, diff --git a/yaksh/evaluator_tests/test_python_evaluation.py b/yaksh/evaluator_tests/test_python_evaluation.py index fb762f9..29336d6 100644 --- a/yaksh/evaluator_tests/test_python_evaluation.py +++ b/yaksh/evaluator_tests/test_python_evaluation.py @@ -33,11 +33,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): def test_correct_answer(self): # Given user_answer = "def add(a,b):\n\treturn a + b" - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False, - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -70,7 +65,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): } # When - # evaluator = PythonAssertionEvaluator() evaluator = CodeEvaluator(self.in_dir) result = evaluator.evaluate(kwargs) @@ -93,11 +87,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): {"test_case_type": "standardtestcase", "test_case": 'assert(add(-1,-2)==-3)', 'weight': 1.0}, {"test_case_type": "standardtestcase", "test_case": 'assert(add(1,2)==3)', 'weight': 2.0} ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': True - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -125,12 +114,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): def test_infinite_loop(self): # Given user_answer = "def add(a, b):\n\twhile True:\n\t\tpass" - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } - kwargs = { 'metadata': { 'user_answer': user_answer, @@ -163,11 +146,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "SyntaxError", "invalid syntax" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -202,12 +180,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "IndentationError", "indented block" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -239,11 +211,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "defined" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -276,11 +243,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "maximum recursion depth exceeded" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -313,11 +275,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "argument" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -353,11 +310,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "base" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -389,11 +341,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): return f.read()[0] """) - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -431,11 +378,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "invalid syntax" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -477,11 +419,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): "NameError", "name 'S' is not defined" ] - # kwargs = {'user_answer': user_answer, - # 'test_case_data': test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = { 'metadata': { 'user_answer': user_answer, @@ -524,10 +461,6 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): print(a+b) """ ) - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'partial_grading': False - # } kwargs = {'metadata': { 'user_answer': user_answer, 'file_paths': self.file_paths, @@ -562,10 +495,6 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): """ ) - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'partial_grading': False - # } kwargs = {'metadata': { 'user_answer': user_answer, 'file_paths': self.file_paths, @@ -598,10 +527,6 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): """ ) - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'partial_grading': False - # } kwargs = {'metadata': { 'user_answer': user_answer, 'file_paths': self.file_paths, @@ -632,10 +557,6 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): print(a-b) """ ) - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'partial_grading': False - # } kwargs = {'metadata': { 'user_answer': user_answer, 'file_paths': self.file_paths, @@ -668,11 +589,6 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): print(a[0]) """ ) - # kwargs = {'user_answer': user_answer, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths, - # 'partial_grading': False - # } kwargs = {'metadata': { 'user_answer': user_answer, 'file_paths': self.file_paths, @@ -701,10 +617,6 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): "You probably have an infinite loop in" " your code.").format(SERVER_TIMEOUT) user_answer = "while True:\n\tpass" - # kwargs = {'user_answer': user_answer, - # 'test_case_data': test_case_data, - # 'partial_grading': False - # } kwargs = {'metadata': { 'user_answer': user_answer, diff --git a/yaksh/evaluator_tests/test_scilab_evaluation.py b/yaksh/evaluator_tests/test_scilab_evaluation.py index de7368f..e879cda 100644 --- a/yaksh/evaluator_tests/test_scilab_evaluation.py +++ b/yaksh/evaluator_tests/test_scilab_evaluation.py @@ -30,13 +30,6 @@ class ScilabEvaluationTestCases(unittest.TestCase): def test_correct_answer(self): user_answer = ("funcprot(0)\nfunction[c]=add(a,b)" "\n\tc=a+b;\nendfunction") - # get_class = ScilabCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -56,13 +49,6 @@ class ScilabEvaluationTestCases(unittest.TestCase): def test_error(self): user_answer = ("funcprot(0)\nfunction[c]=add(a,b)" "\n\tc=a+b;\ndis(\tendfunction") - # get_class = ScilabCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -83,13 +69,6 @@ class ScilabEvaluationTestCases(unittest.TestCase): def test_incorrect_answer(self): user_answer = ("funcprot(0)\nfunction[c]=add(a,b)" "\n\tc=a-b;\nendfunction") - # get_class = ScilabCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, @@ -112,13 +91,6 @@ class ScilabEvaluationTestCases(unittest.TestCase): code_evaluator.SERVER_TIMEOUT = 4 user_answer = ("funcprot(0)\nfunction[c]=add(a,b)" "\n\tc=a;\nwhile(1==1)\nend\nendfunction") - # get_class = ScilabCodeEvaluator(self.in_dir) - # kwargs = {'user_answer': user_answer, - # 'partial_grading': True, - # 'test_case_data': self.test_case_data, - # 'file_paths': self.file_paths - # } - # result = get_class.evaluate(**kwargs) kwargs = { 'metadata': { 'user_answer': user_answer, |