diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-01-12 13:14:05 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-01-12 13:14:05 +0100 |
commit | f1521c9769f9b28cf658a9255dbfc16c98870da9 (patch) | |
tree | 702bda9a5ef6210e2139633dc18c69fe995f1b92 /monkey/__init__.py | |
parent | 740e128bb32075279dd62c677b27c645805cb5e2 (diff) |
Get number of passed/total tests from Prolog test functions
Diffstat (limited to 'monkey/__init__.py')
-rw-r--r-- | monkey/__init__.py | 3 |
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 |