diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-01-15 17:09:43 +0100 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-08-11 14:26:01 +0200 |
commit | 404d1f76bdc99675c6fb526691773aa84d711e55 (patch) | |
tree | b5b47036a86032abca3a45f6efb31318c9863b42 /monkey/prolog | |
parent | abbaf8c97c708e0e02476a6d6a85dfa18d631169 (diff) |
Rename monkey.prolog.engine.test to test_all
Diffstat (limited to 'monkey/prolog')
-rw-r--r-- | monkey/prolog/engine.py | 5 |
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() |