diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2017-03-23 16:44:50 +0100 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2017-03-23 16:44:50 +0100 |
commit | 297645d77929880d79cb251f9535f37ae0a34d50 (patch) | |
tree | 6c33c623e4f02ca829be9acc7875dd0cc9ab61a2 /python/problems | |
parent | 4ba7d1787417d0e1dd8ce48baf04ab5b28379c19 (diff) |
Returns first failed test instead of last.
Diffstat (limited to 'python/problems')
-rw-r--r-- | python/problems/lists_and_for/calculator_polish/common.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/problems/lists_and_for/calculator_polish/common.py b/python/problems/lists_and_for/calculator_polish/common.py index cd18f3b..ab3dc54 100644 --- a/python/problems/lists_and_for/calculator_polish/common.py +++ b/python/problems/lists_and_for/calculator_polish/common.py @@ -71,8 +71,9 @@ def test(python, code, aux_code=''): if all(string_almost_equal(output, c, prec=2) for c in correct): n_correct += 1 else: - tin = test_in[i][1] - tout = correct + if not tin: + tin = test_in[i][1] + tout = correct passed = n_correct == len(test_in) |