summaryrefslogtreecommitdiff
path: root/monkey/__init__.py
diff options
context:
space:
mode:
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