Skip to content

Commit

Permalink
fix(partialcredit): intermittent failures caused value mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
thoward27 committed Mar 2, 2020
1 parent 093b14e commit bcc762f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grade/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v2.1.4"
__version__ = "v2.1.5"
4 changes: 3 additions & 1 deletion grade/pipeline/partialcredit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ def __call__(self):
except Exception as e:
logging.exception(e, exc_info=False)
else:
self._score += self.value.popleft()
self._score += self.value[0]
finally:
self.value.popleft()
return self
2 changes: 1 addition & 1 deletion test/test_pipeline/test_partialcredit.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_value_list_some_fail(self):
logging.disable(logging.CRITICAL)
results = PartialCredit(pipelines, values)()
logging.disable(logging.NOTSET)
self.assertEqual(results.score, 11)
self.assertEqual(results.score, 20)
return

def test_value_list_all_fail(self):
Expand Down

0 comments on commit bcc762f

Please sign in to comment.