summaryrefslogtreecommitdiff
path: root/prolog
diff options
context:
space:
mode:
Diffstat (limited to 'prolog')
-rw-r--r--prolog/engine.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/prolog/engine.py b/prolog/engine.py
index be19fec..048190a 100644
--- a/prolog/engine.py
+++ b/prolog/engine.py
@@ -129,14 +129,14 @@ def test(name, code):
# Try to generate a random test case for problem [name] with [solution] that
# fails for [code]. Give up after [tries] attempts.
-def create_failing_test(name, solution, code, tries=20):
+def create_failing_test(name, solution, code, tries=10):
try:
for i in range(tries):
reply = create_and_ask(code=solution,
query='create_test({}, Test)'.format(name))
testcase = reply['data'][0]['Test']
reply = create_and_ask(code=code,
- query='run_test({}, Result)'.format(testcase))
+ query='run_test({}, Result, 0.1)'.format(testcase))
result = reply['data'][0]['Result']
if not result.startswith('success'):
return testcase