summaryrefslogtreecommitdiff
path: root/prolog/problems
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems')
-rw-r--r--prolog/problems/family_relations/sister_2/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/prolog/problems/family_relations/sister_2/common.py b/prolog/problems/family_relations/sister_2/common.py
index 456ee97..6b1f4e9 100644
--- a/prolog/problems/family_relations/sister_2/common.py
+++ b/prolog/problems/family_relations/sister_2/common.py
@@ -58,7 +58,9 @@ def test(code, aux_code):
if engine_id:
prolog.engine.destroy(engine_id)
- hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}, {'id': 'final_hint'}]
+ hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}]
+ if n_correct == len(test_cases):
+ hints += [{'id': 'final_hint'}]
return n_correct, len(test_cases), hints
def hint(code, aux_code):