diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-01-12 13:14:49 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-01-12 13:14:49 +0100 |
commit | e36a8a2feca7552d236c0f6e89ac73e7e690e7b1 (patch) | |
tree | 646bc6c943461d872bd0226e70ffe4e1567e44cc /prolog/problems/sets | |
parent | f2eaf692038294572e0e5453595c45bc1da92cb6 (diff) |
Return number of passed/total tests from Prolog test functions
Diffstat (limited to 'prolog/problems/sets')
-rw-r--r-- | prolog/problems/sets/diff_3/common.py | 3 | ||||
-rw-r--r-- | prolog/problems/sets/intersect_3/common.py | 3 | ||||
-rw-r--r-- | prolog/problems/sets/is_subset_2/common.py | 3 | ||||
-rw-r--r-- | prolog/problems/sets/is_superset_2/common.py | 3 | ||||
-rw-r--r-- | prolog/problems/sets/powerset_2/common.py | 3 | ||||
-rw-r--r-- | prolog/problems/sets/subset_2/common.py | 3 | ||||
-rw-r--r-- | prolog/problems/sets/union_3/common.py | 3 |
7 files changed, 7 insertions, 14 deletions
diff --git a/prolog/problems/sets/diff_3/common.py b/prolog/problems/sets/diff_3/common.py index 20b03a5..dbb80b4 100644 --- a/prolog/problems/sets/diff_3/common.py +++ b/prolog/problems/sets/diff_3/common.py @@ -52,9 +52,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO diff --git a/prolog/problems/sets/intersect_3/common.py b/prolog/problems/sets/intersect_3/common.py index fa3ca0e..4bb9069 100644 --- a/prolog/problems/sets/intersect_3/common.py +++ b/prolog/problems/sets/intersect_3/common.py @@ -51,9 +51,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO diff --git a/prolog/problems/sets/is_subset_2/common.py b/prolog/problems/sets/is_subset_2/common.py index f66f3fa..9e21584 100644 --- a/prolog/problems/sets/is_subset_2/common.py +++ b/prolog/problems/sets/is_subset_2/common.py @@ -45,9 +45,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO diff --git a/prolog/problems/sets/is_superset_2/common.py b/prolog/problems/sets/is_superset_2/common.py index 4b292a1..48c64a4 100644 --- a/prolog/problems/sets/is_superset_2/common.py +++ b/prolog/problems/sets/is_superset_2/common.py @@ -45,9 +45,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO diff --git a/prolog/problems/sets/powerset_2/common.py b/prolog/problems/sets/powerset_2/common.py index 02e8a3c..6208c0f 100644 --- a/prolog/problems/sets/powerset_2/common.py +++ b/prolog/problems/sets/powerset_2/common.py @@ -43,9 +43,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO diff --git a/prolog/problems/sets/subset_2/common.py b/prolog/problems/sets/subset_2/common.py index 51070dc..6f2fafb 100644 --- a/prolog/problems/sets/subset_2/common.py +++ b/prolog/problems/sets/subset_2/common.py @@ -56,9 +56,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO diff --git a/prolog/problems/sets/union_3/common.py b/prolog/problems/sets/union_3/common.py index f8410a2..8df6b53 100644 --- a/prolog/problems/sets/union_3/common.py +++ b/prolog/problems/sets/union_3/common.py @@ -48,9 +48,8 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - passed = n_correct == len(test_cases) hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] - return passed, hints + return n_correct, len(test_cases), hints def hint(code, aux_code): # TODO |