summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-01-26 15:41:18 +0100
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:01 +0200
commite155b4ba28bdcfe757c8aaab2673e84b49073132 (patch)
treea2af8c77011a66f355cd60b3c6d899b8bb3fd131 /monkey
parent03eda3425520090fb170a351c8c834a04f4c402d (diff)
Find out pengine ID server-side in run_tests
Diffstat (limited to 'monkey')
-rw-r--r--monkey/prolog/engine.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/monkey/prolog/engine.py b/monkey/prolog/engine.py
index e73ea54..f11854a 100644
--- a/monkey/prolog/engine.py
+++ b/monkey/prolog/engine.py
@@ -115,7 +115,7 @@ class PrologEngine(object):
# 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))
+ reply = engine.ask("run_tests({}, Results)".format(name))
engine.destroy()
if reply['event'] != 'success':
@@ -132,7 +132,7 @@ def test(name, code):
ret = False
try:
engine = PrologEngine(code=code)
- ret = engine.ask("run_tests({}, '{}')".format(name, engine.id))['event'] == 'success'
+ ret = engine.ask("run_tests({})".format(name))['event'] == 'success'
engine.destroy()
except Exception as ex:
pass
@@ -142,5 +142,5 @@ def test(name, code):
if __name__ == '__main__':
engine = PrologEngine(code='dup([],[]). dup([H|T],[H,H|TT]) :- dup(T,TT).')
print('engine id is ' + engine.id)
- print(engine.ask("run_tests({},'{}',Result)".format('dup/2', engine.id)))
+ print(engine.ask("run_tests({}, Result)".format('dup/2')))
engine.destroy()