summaryrefslogtreecommitdiff
path: root/yaksh/tests/test_code_server.py
diff options
context:
space:
mode:
authorankitjavalkar2016-11-10 12:36:13 +0530
committerankitjavalkar2016-11-10 12:43:14 +0530
commita09df642d4f3623ee517aaed2eac1372ebacc0e0 (patch)
tree7bfb5c55066bf7bda56dfeb02eeb4dbc2f0a2bef /yaksh/tests/test_code_server.py
parent4904a8305e7e83a00cef718a42bbbf8e7d5f8740 (diff)
downloadonline_test-a09df642d4f3623ee517aaed2eac1372ebacc0e0.tar.gz
online_test-a09df642d4f3623ee517aaed2eac1372ebacc0e0.tar.bz2
online_test-a09df642d4f3623ee517aaed2eac1372ebacc0e0.zip
Add point based weightage for partial grading instead of percentage based partial grading
Diffstat (limited to 'yaksh/tests/test_code_server.py')
-rw-r--r--yaksh/tests/test_code_server.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/yaksh/tests/test_code_server.py b/yaksh/tests/test_code_server.py
index d446444..19560e4 100644
--- a/yaksh/tests/test_code_server.py
+++ b/yaksh/tests/test_code_server.py
@@ -35,12 +35,12 @@ class TestCodeServer(unittest.TestCase):
def setUp(self):
self.code_server = CodeServerProxy()
- def test_inifinite_loop(self):
+ def test_infinite_loop(self):
# Given
testdata = {'user_answer': 'while True: pass',
- 'partial_grading': True,
+ 'partial_grading': False,
'test_case_data': [{'test_case':'assert 1==2',
- 'marks': 0.0
+ 'weightage': 0.0
}
]}
@@ -57,9 +57,9 @@ class TestCodeServer(unittest.TestCase):
def test_correct_answer(self):
# Given
testdata = {'user_answer': 'def f(): return 1',
- 'partial_grading': True,
+ 'partial_grading': False,
'test_case_data': [{'test_case':'assert f() == 1',
- 'marks': 0.0
+ 'weightage': 0.0
}
]}
@@ -76,9 +76,9 @@ class TestCodeServer(unittest.TestCase):
def test_wrong_answer(self):
# Given
testdata = {'user_answer': 'def f(): return 1',
- 'partial_grading': True,
+ 'partial_grading': False,
'test_case_data': [{'test_case':'assert f() == 2',
- 'marks': 0.0
+ 'weightage': 0.0
}
]}
@@ -99,9 +99,9 @@ class TestCodeServer(unittest.TestCase):
def run_code():
"""Run an infinite loop."""
testdata = {'user_answer': 'while True: pass',
- 'partial_grading': True,
+ 'partial_grading': False,
'test_case_data': [{'test_case':'assert 1==2',
- 'marks': 0.0
+ 'weightage': 0.0
}
]}
result = self.code_server.run_code(