summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/changelog.rst9
-rw-r--r--factory/containers.py3
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 6658a96..0bf0eb3 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -11,6 +11,15 @@ ChangeLog
- Add support for :attr:`factory.fuzzy.FuzzyInteger.step`, thanks to `ilya-pirogov <https://github.com/ilya-pirogov>`_ (:issue:`120`)
+.. _v2.3.1:
+
+2.3.1 (maint)
+-------------
+
+*Bugfix:*
+
+ - Fix badly written assert containing state-changing code, spotted by `chsigi <https://github.com/chsigi>`_ (:issue:`126`)
+
.. _v2.3.0:
2.3.0 (2013-12-25)
diff --git a/factory/containers.py b/factory/containers.py
index 7a4c5db..4537e44 100644
--- a/factory/containers.py
+++ b/factory/containers.py
@@ -103,7 +103,8 @@ class LazyStub(object):
if isinstance(val, LazyValue):
self.__pending.append(name)
val = val.evaluate(self, self.__containers)
- assert name == self.__pending.pop()
+ last = self.__pending.pop()
+ assert name == last
self.__values[name] = val
return val
else: