summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2014-01-21 21:15:02 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2014-01-21 21:15:02 +0100
commit402138768870871ef38b5c01ccaec957aa771d26 (patch)
treeba4066c72a6ed72921d9707dd9bbd6ca8872a47a
parentc404da5080c92527e26c6b82d5cc5d7d88ba3d9a (diff)
parent3feb4f51a58e39a7aaf82222bff27ba181920b2e (diff)
downloadfactory-boy-402138768870871ef38b5c01ccaec957aa771d26.tar
factory-boy-402138768870871ef38b5c01ccaec957aa771d26.tar.gz
Merge branch 'maint/2.3.x'
Conflicts: docs/changelog.rst
-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: