diff options
author | ankitjavalkar | 2016-12-20 12:42:44 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-12-20 15:31:22 +0530 |
commit | bf5b4e7607bae0b81ceeb99e8bf5d750433e92e8 (patch) | |
tree | c0d4a002bba428269c2f7ba62eb68d24b8cbec5f /yaksh/evaluator_tests/test_bash_evaluation.py | |
parent | 798d36aa12e22928e884668ae5c80a25d48393ea (diff) | |
download | online_test-bf5b4e7607bae0b81ceeb99e8bf5d750433e92e8.tar.gz online_test-bf5b4e7607bae0b81ceeb99e8bf5d750433e92e8.tar.bz2 online_test-bf5b4e7607bae0b81ceeb99e8bf5d750433e92e8.zip |
Fix errors and rename resources
- code_evaluator module and class renamed to grader
- Test cases fixed
- Comments removed
- weight variable renamed to mark
Diffstat (limited to 'yaksh/evaluator_tests/test_bash_evaluation.py')
-rw-r--r-- | yaksh/evaluator_tests/test_bash_evaluation.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/yaksh/evaluator_tests/test_bash_evaluation.py b/yaksh/evaluator_tests/test_bash_evaluation.py index 142d7f0..06a56e4 100644 --- a/yaksh/evaluator_tests/test_bash_evaluation.py +++ b/yaksh/evaluator_tests/test_bash_evaluation.py @@ -3,9 +3,9 @@ import unittest import os import shutil import tempfile -from yaksh.code_evaluator import CodeEvaluator +from yaksh.grader import Grader from yaksh.bash_code_evaluator import BashCodeEvaluator -from yaksh.bash_stdio_evaluator import BashStdioEvaluator +from yaksh.bash_stdio_evaluator import BashStdIOEvaluator from yaksh.settings import SERVER_TIMEOUT from textwrap import dedent @@ -44,8 +44,8 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertTrue(result.get('success')) self.assertEqual(result.get('error'), "Correct answer\n") @@ -63,8 +63,8 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertFalse(result.get("success")) self.assertTrue("Error" in result.get("error")) @@ -82,8 +82,8 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertFalse(result.get("success")) self.assertEqual(result.get("error"), self.timeout_msg) @@ -107,13 +107,13 @@ class BashAssertionEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertTrue(result.get("success")) self.assertEqual(result.get("error"), "Correct answer\n") -class BashStdioEvaluationTestCases(unittest.TestCase): +class BashStdIOEvaluationTestCases(unittest.TestCase): def setUp(self): self.in_dir = tempfile.mkdtemp() self.timeout_msg = ("Code took more than {0} seconds to run. " @@ -144,8 +144,8 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertEqual(result.get('error'), "Correct answer\n") self.assertTrue(result.get('success')) @@ -174,8 +174,8 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertEqual(result.get('error'), "Correct answer\n") self.assertTrue(result.get('success')) @@ -202,8 +202,8 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertIn("Incorrect", result.get('error')) self.assertFalse(result.get('success')) @@ -229,8 +229,8 @@ class BashStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': test_case_data, } - evaluator = CodeEvaluator(self.in_dir) - result = evaluator.evaluate(kwargs) + grader = Grader(self.in_dir) + result = grader.evaluate(kwargs) self.assertEqual(result.get('error'), "Correct answer\n") self.assertTrue(result.get('success')) |