diff --git a/grade/__init__.py b/grade/__init__.py index 34cfe49..2d71831 100644 --- a/grade/__init__.py +++ b/grade/__init__.py @@ -1 +1 @@ -__version__ = "v2.1.4" +__version__ = "v2.1.5" diff --git a/grade/pipeline/partialcredit.py b/grade/pipeline/partialcredit.py index 1cc6310..ea4b219 100644 --- a/grade/pipeline/partialcredit.py +++ b/grade/pipeline/partialcredit.py @@ -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 diff --git a/test/test_pipeline/test_partialcredit.py b/test/test_pipeline/test_partialcredit.py index d287658..9a1ace6 100644 --- a/test/test_pipeline/test_partialcredit.py +++ b/test/test_pipeline/test_partialcredit.py @@ -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):