summaryrefslogtreecommitdiff
path: root/monkey/__init__.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-01-12 13:14:05 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-01-12 13:14:05 +0100
commitf1521c9769f9b28cf658a9255dbfc16c98870da9 (patch)
tree702bda9a5ef6210e2139633dc18c69fe995f1b92 /monkey/__init__.py
parent740e128bb32075279dd62c677b27c645805cb5e2 (diff)
Get number of passed/total tests from Prolog test functions
Diffstat (limited to 'monkey/__init__.py')
-rw-r--r--monkey/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/monkey/__init__.py b/monkey/__init__.py
index 83ea215..fbb4535 100644
--- a/monkey/__init__.py
+++ b/monkey/__init__.py
@@ -83,7 +83,8 @@ def fix(code, edits, test, timeout=30, debug=False):
print('{}: {} → {}'.format(idx, stringify(a), stringify(b)))
# If the code is correct, we are done.
- if test(code):
+ n_correct, n_all = test(code)
+ if n_correct == n_all:
return code, path, total_time, n_tested
n_tested += 1