summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-17 15:44:40 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-17 15:44:40 +0100
commit66ae415ba019fa4528f61a23948e56a713902295 (patch)
tree3b626d214d3d85c6341f1fa2668a153e568fd66f
parent138610b0709d6e251c16b391242023eec393d775 (diff)
Prolog: only catch timeout in test functions
-rw-r--r--prolog/problems/clp_fd/gcd_3/common.py2
-rw-r--r--prolog/problems/clp_fd/magic_1/common.py2
-rw-r--r--prolog/problems/clp_fd/puzzle_abc_3/common.py2
-rw-r--r--prolog/problems/clp_fd/puzzle_beth_1/common.py2
-rw-r--r--prolog/problems/clp_fd/puzzle_momson_2/common.py2
-rw-r--r--prolog/problems/clp_fd/puzzle_ratio_2/common.py2
-rw-r--r--prolog/problems/clp_fd/tobase_3/common.py2
-rw-r--r--prolog/problems/family_relations/ancestor_2/common.py2
-rw-r--r--prolog/problems/family_relations/aunt_2/common.py2
-rw-r--r--prolog/problems/family_relations/brother_2/common.py2
-rw-r--r--prolog/problems/family_relations/connected_3/common.py2
-rw-r--r--prolog/problems/family_relations/cousin_2/common.py2
-rw-r--r--prolog/problems/family_relations/descendant_2/common.py2
-rw-r--r--prolog/problems/family_relations/father_2/common.py2
-rw-r--r--prolog/problems/family_relations/grandparent_2/common.py2
-rw-r--r--prolog/problems/family_relations/mother_2/common.py2
-rw-r--r--prolog/problems/family_relations/sister_2/common.py2
-rw-r--r--prolog/problems/license_plates/checklicenseplate_3/common.py2
-rw-r--r--prolog/problems/license_plates/firstminus_2/common.py2
-rw-r--r--prolog/problems/license_plates/genexp_2/common.py2
-rw-r--r--prolog/problems/license_plates/getdigits_2/common.py2
-rw-r--r--prolog/problems/license_plates/joindigits_2/common.py2
-rw-r--r--prolog/problems/lists/conc_3/common.py2
-rw-r--r--prolog/problems/lists/count_3/common.py2
-rw-r--r--prolog/problems/lists/del_3/common.py2
-rw-r--r--prolog/problems/lists/divide_3/common.py2
-rw-r--r--prolog/problems/lists/dup_2/common.py2
-rw-r--r--prolog/problems/lists/evenlen_1_+_oddlen_1/common.py2
-rw-r--r--prolog/problems/lists/insert_3/common.py2
-rw-r--r--prolog/problems/lists/len_2/common.py2
-rw-r--r--prolog/problems/lists/max_2/common.py2
-rw-r--r--prolog/problems/lists/memb_2/common.py2
-rw-r--r--prolog/problems/lists/min_2/common.py2
-rw-r--r--prolog/problems/lists/palindrome_1/common.py2
-rw-r--r--prolog/problems/lists/permute_2/common.py2
-rw-r--r--prolog/problems/lists/rev_2/common.py2
-rw-r--r--prolog/problems/lists/shiftleft_2/common.py2
-rw-r--r--prolog/problems/lists/shiftright_2/common.py2
-rw-r--r--prolog/problems/lists/sublist_2/common.py2
-rw-r--r--prolog/problems/lists/sum_2/common.py2
-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
-rw-r--r--prolog/problems/sorting/is_sorted_1/common.py2
-rw-r--r--prolog/problems/sorting/isort_2/common.py2
-rw-r--r--prolog/problems/sorting/pivoting_4/common.py2
-rw-r--r--prolog/problems/sorting/quick_sort_2/common.py2
-rw-r--r--prolog/problems/sorting/sins_3/common.py2
-rw-r--r--prolog/problems/sorting/slowest_sort_ever_2/common.py2
53 files changed, 53 insertions, 53 deletions
diff --git a/prolog/problems/clp_fd/gcd_3/common.py b/prolog/problems/clp_fd/gcd_3/common.py
index 82ffb28..5048a73 100644
--- a/prolog/problems/clp_fd/gcd_3/common.py
+++ b/prolog/problems/clp_fd/gcd_3/common.py
@@ -45,7 +45,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/clp_fd/magic_1/common.py b/prolog/problems/clp_fd/magic_1/common.py
index 7978c02..c9e89c7 100644
--- a/prolog/problems/clp_fd/magic_1/common.py
+++ b/prolog/problems/clp_fd/magic_1/common.py
@@ -43,7 +43,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/clp_fd/puzzle_abc_3/common.py b/prolog/problems/clp_fd/puzzle_abc_3/common.py
index 95458ab..74275e9 100644
--- a/prolog/problems/clp_fd/puzzle_abc_3/common.py
+++ b/prolog/problems/clp_fd/puzzle_abc_3/common.py
@@ -35,7 +35,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/clp_fd/puzzle_beth_1/common.py b/prolog/problems/clp_fd/puzzle_beth_1/common.py
index 0a2bbb6..50bdf08 100644
--- a/prolog/problems/clp_fd/puzzle_beth_1/common.py
+++ b/prolog/problems/clp_fd/puzzle_beth_1/common.py
@@ -30,7 +30,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/clp_fd/puzzle_momson_2/common.py b/prolog/problems/clp_fd/puzzle_momson_2/common.py
index 927b250..cd423fb 100644
--- a/prolog/problems/clp_fd/puzzle_momson_2/common.py
+++ b/prolog/problems/clp_fd/puzzle_momson_2/common.py
@@ -37,7 +37,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/clp_fd/puzzle_ratio_2/common.py b/prolog/problems/clp_fd/puzzle_ratio_2/common.py
index 914f4d1..d62a15f 100644
--- a/prolog/problems/clp_fd/puzzle_ratio_2/common.py
+++ b/prolog/problems/clp_fd/puzzle_ratio_2/common.py
@@ -38,7 +38,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/clp_fd/tobase_3/common.py b/prolog/problems/clp_fd/tobase_3/common.py
index 2b5f37a..e358210 100644
--- a/prolog/problems/clp_fd/tobase_3/common.py
+++ b/prolog/problems/clp_fd/tobase_3/common.py
@@ -46,7 +46,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/ancestor_2/common.py b/prolog/problems/family_relations/ancestor_2/common.py
index c66a9b2..49df9ad 100644
--- a/prolog/problems/family_relations/ancestor_2/common.py
+++ b/prolog/problems/family_relations/ancestor_2/common.py
@@ -50,7 +50,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/aunt_2/common.py b/prolog/problems/family_relations/aunt_2/common.py
index 3732d7d..e545000 100644
--- a/prolog/problems/family_relations/aunt_2/common.py
+++ b/prolog/problems/family_relations/aunt_2/common.py
@@ -54,7 +54,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/brother_2/common.py b/prolog/problems/family_relations/brother_2/common.py
index d409f74..c49489e 100644
--- a/prolog/problems/family_relations/brother_2/common.py
+++ b/prolog/problems/family_relations/brother_2/common.py
@@ -48,7 +48,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/connected_3/common.py b/prolog/problems/family_relations/connected_3/common.py
index 5b1a3aa..72dd90f 100644
--- a/prolog/problems/family_relations/connected_3/common.py
+++ b/prolog/problems/family_relations/connected_3/common.py
@@ -39,7 +39,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/cousin_2/common.py b/prolog/problems/family_relations/cousin_2/common.py
index 334f422..c6d07c7 100644
--- a/prolog/problems/family_relations/cousin_2/common.py
+++ b/prolog/problems/family_relations/cousin_2/common.py
@@ -61,7 +61,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/descendant_2/common.py b/prolog/problems/family_relations/descendant_2/common.py
index b30ae3b..d2a2dcb 100644
--- a/prolog/problems/family_relations/descendant_2/common.py
+++ b/prolog/problems/family_relations/descendant_2/common.py
@@ -50,7 +50,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/father_2/common.py b/prolog/problems/family_relations/father_2/common.py
index 13333d1..0c65a83 100644
--- a/prolog/problems/family_relations/father_2/common.py
+++ b/prolog/problems/family_relations/father_2/common.py
@@ -51,7 +51,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/grandparent_2/common.py b/prolog/problems/family_relations/grandparent_2/common.py
index 1e073db..73c24e4 100644
--- a/prolog/problems/family_relations/grandparent_2/common.py
+++ b/prolog/problems/family_relations/grandparent_2/common.py
@@ -52,7 +52,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/mother_2/common.py b/prolog/problems/family_relations/mother_2/common.py
index 456f51f..040c13e 100644
--- a/prolog/problems/family_relations/mother_2/common.py
+++ b/prolog/problems/family_relations/mother_2/common.py
@@ -52,7 +52,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/family_relations/sister_2/common.py b/prolog/problems/family_relations/sister_2/common.py
index 37d8963..08f44b3 100644
--- a/prolog/problems/family_relations/sister_2/common.py
+++ b/prolog/problems/family_relations/sister_2/common.py
@@ -49,7 +49,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/license_plates/checklicenseplate_3/common.py b/prolog/problems/license_plates/checklicenseplate_3/common.py
index 028b077..3a403d2 100644
--- a/prolog/problems/license_plates/checklicenseplate_3/common.py
+++ b/prolog/problems/license_plates/checklicenseplate_3/common.py
@@ -81,7 +81,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/license_plates/firstminus_2/common.py b/prolog/problems/license_plates/firstminus_2/common.py
index e4b09a0..dd967b6 100644
--- a/prolog/problems/license_plates/firstminus_2/common.py
+++ b/prolog/problems/license_plates/firstminus_2/common.py
@@ -32,7 +32,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/license_plates/genexp_2/common.py b/prolog/problems/license_plates/genexp_2/common.py
index 28d9b57..4e2ebdf 100644
--- a/prolog/problems/license_plates/genexp_2/common.py
+++ b/prolog/problems/license_plates/genexp_2/common.py
@@ -53,7 +53,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/license_plates/getdigits_2/common.py b/prolog/problems/license_plates/getdigits_2/common.py
index 68b28b8..33c45c6 100644
--- a/prolog/problems/license_plates/getdigits_2/common.py
+++ b/prolog/problems/license_plates/getdigits_2/common.py
@@ -37,7 +37,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/license_plates/joindigits_2/common.py b/prolog/problems/license_plates/joindigits_2/common.py
index ed08b28..ed284e7 100644
--- a/prolog/problems/license_plates/joindigits_2/common.py
+++ b/prolog/problems/license_plates/joindigits_2/common.py
@@ -36,7 +36,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/conc_3/common.py b/prolog/problems/lists/conc_3/common.py
index e24ec18..82b700f 100644
--- a/prolog/problems/lists/conc_3/common.py
+++ b/prolog/problems/lists/conc_3/common.py
@@ -36,7 +36,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/count_3/common.py b/prolog/problems/lists/count_3/common.py
index 25474b6..0f4f171 100644
--- a/prolog/problems/lists/count_3/common.py
+++ b/prolog/problems/lists/count_3/common.py
@@ -40,7 +40,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/del_3/common.py b/prolog/problems/lists/del_3/common.py
index 9a1554a..f19146f 100644
--- a/prolog/problems/lists/del_3/common.py
+++ b/prolog/problems/lists/del_3/common.py
@@ -34,7 +34,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/divide_3/common.py b/prolog/problems/lists/divide_3/common.py
index a600e02..25959aa 100644
--- a/prolog/problems/lists/divide_3/common.py
+++ b/prolog/problems/lists/divide_3/common.py
@@ -39,7 +39,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/dup_2/common.py b/prolog/problems/lists/dup_2/common.py
index 0593ae5..3697fa6 100644
--- a/prolog/problems/lists/dup_2/common.py
+++ b/prolog/problems/lists/dup_2/common.py
@@ -36,7 +36,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/evenlen_1_+_oddlen_1/common.py b/prolog/problems/lists/evenlen_1_+_oddlen_1/common.py
index 2adacaf..846ae95 100644
--- a/prolog/problems/lists/evenlen_1_+_oddlen_1/common.py
+++ b/prolog/problems/lists/evenlen_1_+_oddlen_1/common.py
@@ -42,7 +42,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/insert_3/common.py b/prolog/problems/lists/insert_3/common.py
index b3b5f1c..281d10c 100644
--- a/prolog/problems/lists/insert_3/common.py
+++ b/prolog/problems/lists/insert_3/common.py
@@ -36,7 +36,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/len_2/common.py b/prolog/problems/lists/len_2/common.py
index ca3d985..edcbe41 100644
--- a/prolog/problems/lists/len_2/common.py
+++ b/prolog/problems/lists/len_2/common.py
@@ -35,7 +35,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/max_2/common.py b/prolog/problems/lists/max_2/common.py
index b4a0311..5187df3 100644
--- a/prolog/problems/lists/max_2/common.py
+++ b/prolog/problems/lists/max_2/common.py
@@ -39,7 +39,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/memb_2/common.py b/prolog/problems/lists/memb_2/common.py
index e0914fa..b258731 100644
--- a/prolog/problems/lists/memb_2/common.py
+++ b/prolog/problems/lists/memb_2/common.py
@@ -32,7 +32,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/min_2/common.py b/prolog/problems/lists/min_2/common.py
index a26a14d..39ffe89 100644
--- a/prolog/problems/lists/min_2/common.py
+++ b/prolog/problems/lists/min_2/common.py
@@ -39,7 +39,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/palindrome_1/common.py b/prolog/problems/lists/palindrome_1/common.py
index 251c0da..df7b2c0 100644
--- a/prolog/problems/lists/palindrome_1/common.py
+++ b/prolog/problems/lists/palindrome_1/common.py
@@ -40,7 +40,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/permute_2/common.py b/prolog/problems/lists/permute_2/common.py
index 2568bbb..6a3cc7f 100644
--- a/prolog/problems/lists/permute_2/common.py
+++ b/prolog/problems/lists/permute_2/common.py
@@ -38,7 +38,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/rev_2/common.py b/prolog/problems/lists/rev_2/common.py
index 0875273..b34a2fa 100644
--- a/prolog/problems/lists/rev_2/common.py
+++ b/prolog/problems/lists/rev_2/common.py
@@ -38,7 +38,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/shiftleft_2/common.py b/prolog/problems/lists/shiftleft_2/common.py
index be0013f..0d1c224 100644
--- a/prolog/problems/lists/shiftleft_2/common.py
+++ b/prolog/problems/lists/shiftleft_2/common.py
@@ -36,7 +36,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/shiftright_2/common.py b/prolog/problems/lists/shiftright_2/common.py
index 21ce708..728bae9 100644
--- a/prolog/problems/lists/shiftright_2/common.py
+++ b/prolog/problems/lists/shiftright_2/common.py
@@ -36,7 +36,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/sublist_2/common.py b/prolog/problems/lists/sublist_2/common.py
index 99e0cf3..73e70ef 100644
--- a/prolog/problems/lists/sublist_2/common.py
+++ b/prolog/problems/lists/sublist_2/common.py
@@ -39,7 +39,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/lists/sum_2/common.py b/prolog/problems/lists/sum_2/common.py
index 2b6808a..559b18f 100644
--- a/prolog/problems/lists/sum_2/common.py
+++ b/prolog/problems/lists/sum_2/common.py
@@ -35,7 +35,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/diff_3/common.py b/prolog/problems/sets/diff_3/common.py
index d9b5362..fe21e50 100644
--- a/prolog/problems/sets/diff_3/common.py
+++ b/prolog/problems/sets/diff_3/common.py
@@ -48,7 +48,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/intersect_3/common.py b/prolog/problems/sets/intersect_3/common.py
index e30e3dc..1cf2945 100644
--- a/prolog/problems/sets/intersect_3/common.py
+++ b/prolog/problems/sets/intersect_3/common.py
@@ -47,7 +47,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/is_subset_2/common.py b/prolog/problems/sets/is_subset_2/common.py
index aee4e81..696a4a6 100644
--- a/prolog/problems/sets/is_subset_2/common.py
+++ b/prolog/problems/sets/is_subset_2/common.py
@@ -41,7 +41,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/is_superset_2/common.py b/prolog/problems/sets/is_superset_2/common.py
index db32c8d..41a0aa3 100644
--- a/prolog/problems/sets/is_superset_2/common.py
+++ b/prolog/problems/sets/is_superset_2/common.py
@@ -41,7 +41,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/powerset_2/common.py b/prolog/problems/sets/powerset_2/common.py
index 020b05e..aec5cab 100644
--- a/prolog/problems/sets/powerset_2/common.py
+++ b/prolog/problems/sets/powerset_2/common.py
@@ -39,7 +39,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/subset_2/common.py b/prolog/problems/sets/subset_2/common.py
index 3871880..9cf4714 100644
--- a/prolog/problems/sets/subset_2/common.py
+++ b/prolog/problems/sets/subset_2/common.py
@@ -52,7 +52,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sets/union_3/common.py b/prolog/problems/sets/union_3/common.py
index 30780dc..899d20e 100644
--- a/prolog/problems/sets/union_3/common.py
+++ b/prolog/problems/sets/union_3/common.py
@@ -44,7 +44,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sorting/is_sorted_1/common.py b/prolog/problems/sorting/is_sorted_1/common.py
index 8921b54..6409f20 100644
--- a/prolog/problems/sorting/is_sorted_1/common.py
+++ b/prolog/problems/sorting/is_sorted_1/common.py
@@ -44,7 +44,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sorting/isort_2/common.py b/prolog/problems/sorting/isort_2/common.py
index e929eb1..7b48990 100644
--- a/prolog/problems/sorting/isort_2/common.py
+++ b/prolog/problems/sorting/isort_2/common.py
@@ -43,7 +43,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sorting/pivoting_4/common.py b/prolog/problems/sorting/pivoting_4/common.py
index e558a8a..4dbabcb 100644
--- a/prolog/problems/sorting/pivoting_4/common.py
+++ b/prolog/problems/sorting/pivoting_4/common.py
@@ -40,7 +40,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sorting/quick_sort_2/common.py b/prolog/problems/sorting/quick_sort_2/common.py
index c287f38..25466e2 100644
--- a/prolog/problems/sorting/quick_sort_2/common.py
+++ b/prolog/problems/sorting/quick_sort_2/common.py
@@ -49,7 +49,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sorting/sins_3/common.py b/prolog/problems/sorting/sins_3/common.py
index 0650eb6..a582dc5 100644
--- a/prolog/problems/sorting/sins_3/common.py
+++ b/prolog/problems/sorting/sins_3/common.py
@@ -41,7 +41,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id:
diff --git a/prolog/problems/sorting/slowest_sort_ever_2/common.py b/prolog/problems/sorting/slowest_sort_ever_2/common.py
index 06df01b..304f491 100644
--- a/prolog/problems/sorting/slowest_sort_ever_2/common.py
+++ b/prolog/problems/sorting/slowest_sort_ever_2/common.py
@@ -50,7 +50,7 @@ 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:
+ except socket.timeout:
pass
finally:
if engine_id: