From 404d1f76bdc99675c6fb526691773aa84d711e55 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 15 Jan 2015 17:09:43 +0100 Subject: Rename monkey.prolog.engine.test to test_all --- monkey/prolog/engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'monkey') 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() -- cgit v1.2.1