summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monkey/prolog/engine.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/monkey/prolog/engine.py b/monkey/prolog/engine.py
index dff577c..2ed59a5 100644
--- a/monkey/prolog/engine.py
+++ b/monkey/prolog/engine.py
@@ -25,7 +25,6 @@ class PrologEngine(object):
warnings = []
errors = []
for output in outputs:
- print(output)
message = PrologEngine.parse_prolog_output(output)
if output['message'] == 'warning':
warnings.append(message)
@@ -114,7 +113,9 @@ class PrologEngine(object):
message = re.sub(r'_G[0-9]*', '_', message)
return message
-def test(name, code):
+# Test whether [code] is a correct solution for problem [name]. Runs all tests
+# and returns a list of results. Raises an exception on error.
+def test_all(name, code):
engine = PrologEngine(code=code)
reply = engine.ask("run_tests({}, '{}', Results)".format(name, engine.id))
engine.destroy()