summaryrefslogtreecommitdiff
path: root/prolog/problems/sets
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/sets')
-rw-r--r--prolog/problems/sets/diff_3/common.py2
-rw-r--r--prolog/problems/sets/intersect_3/common.py2
-rw-r--r--prolog/problems/sets/is_subset_2/common.py2
-rw-r--r--prolog/problems/sets/is_superset_2/common.py2
-rw-r--r--prolog/problems/sets/powerset_2/common.py2
-rw-r--r--prolog/problems/sets/subset_2/common.py2
-rw-r--r--prolog/problems/sets/union_3/common.py2
7 files changed, 14 insertions, 0 deletions
diff --git a/prolog/problems/sets/diff_3/common.py b/prolog/problems/sets/diff_3/common.py
index dbb80b4..d9b5362 100644
--- a/prolog/problems/sets/diff_3/common.py
+++ b/prolog/problems/sets/diff_3/common.py
@@ -48,6 +48,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)
diff --git a/prolog/problems/sets/intersect_3/common.py b/prolog/problems/sets/intersect_3/common.py
index 4bb9069..e30e3dc 100644
--- a/prolog/problems/sets/intersect_3/common.py
+++ b/prolog/problems/sets/intersect_3/common.py
@@ -47,6 +47,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)
diff --git a/prolog/problems/sets/is_subset_2/common.py b/prolog/problems/sets/is_subset_2/common.py
index 9e21584..aee4e81 100644
--- a/prolog/problems/sets/is_subset_2/common.py
+++ b/prolog/problems/sets/is_subset_2/common.py
@@ -41,6 +41,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)
diff --git a/prolog/problems/sets/is_superset_2/common.py b/prolog/problems/sets/is_superset_2/common.py
index 48c64a4..db32c8d 100644
--- a/prolog/problems/sets/is_superset_2/common.py
+++ b/prolog/problems/sets/is_superset_2/common.py
@@ -41,6 +41,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)
diff --git a/prolog/problems/sets/powerset_2/common.py b/prolog/problems/sets/powerset_2/common.py
index 6208c0f..020b05e 100644
--- a/prolog/problems/sets/powerset_2/common.py
+++ b/prolog/problems/sets/powerset_2/common.py
@@ -39,6 +39,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)
diff --git a/prolog/problems/sets/subset_2/common.py b/prolog/problems/sets/subset_2/common.py
index 6f2fafb..3871880 100644
--- a/prolog/problems/sets/subset_2/common.py
+++ b/prolog/problems/sets/subset_2/common.py
@@ -52,6 +52,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)
diff --git a/prolog/problems/sets/union_3/common.py b/prolog/problems/sets/union_3/common.py
index 8df6b53..30780dc 100644
--- a/prolog/problems/sets/union_3/common.py
+++ b/prolog/problems/sets/union_3/common.py
@@ -44,6 +44,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)