summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-09-24 18:41:22 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-09-24 18:41:22 +0200
commite58c8bd7ea894e28a23a68b664772314720cd879 (patch)
treee3a7461f390c02ffb1116a1919b6594b4bab7121
parentbd432b142558147694c3a3f155c633c1340293f9 (diff)
Update monkey.test.test for new testing functions
-rwxr-xr-xmonkey/test.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/monkey/test.py b/monkey/test.py
index 38f37a0..6736702 100755
--- a/monkey/test.py
+++ b/monkey/test.py
@@ -27,13 +27,11 @@ solved_problems = [p for p in CodeqUser.solved_problems(1, language)
if p != (problem_group, problem)]
other_solutions = server.problems.solutions_for_problems(language, solved_problems)
problem_module = server.problems.load_problem(language, problem_group, problem, 'common')
-problem_facts = server.problems.get_facts(language, problem_module) or ''
-aux_code = other_solutions + '\n' + problem_facts
# Testing function.
def test(code):
- n_correct, n_all = problem_module.test(code + '\n' + aux_code)
- return n_correct == n_all
+ correct, hints = problem_module.test(code, solved_problems)
+ return correct
traces = [s.trace for s in Solution.filter(problem_id=pid)]