From 05e778a6d06f9d74ebc73fb5113643ffd80a6a8b Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 12 Feb 2016 14:47:33 +0100 Subject: Prolog: catch exceptions in test functions --- prolog/problems/lists/memb_2/common.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'prolog/problems/lists/memb_2') diff --git a/prolog/problems/lists/memb_2/common.py b/prolog/problems/lists/memb_2/common.py index fea670b..e0914fa 100644 --- a/prolog/problems/lists/memb_2/common.py +++ b/prolog/problems/lists/memb_2/common.py @@ -32,6 +32,8 @@ def test(code, aux_code): for query, answers in test_cases: if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 + except: + pass finally: if engine_id: prolog.engine.destroy(engine_id) -- cgit v1.2.1