1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/babc46921e8e/
changeset:   babc46921e8e
user:        embe
date:        2011-07-11 11:57:47
summary:     Fix a typo in assertion rewriting.
affected #:  2 files (165 bytes)

--- a/_pytest/assertion/rewrite.py      Sun Jul 10 21:02:36 2011 -0500
+++ b/_pytest/assertion/rewrite.py      Mon Jul 11 11:57:47 2011 +0200
@@ -421,7 +421,7 @@
             if chain:
                 where = []
                 if len(chain) > 1:
-                    cond = ast.Boolop(ast.And(), chain)
+                    cond = ast.BoolOp(ast.And(), list(chain))
                 else:
                     cond = chain[0]
                 self.statements.append(ast.If(cond, where, []))


--- a/testing/test_assertrewrite.py     Sun Jul 10 21:02:36 2011 -0500
+++ b/testing/test_assertrewrite.py     Mon Jul 11 11:57:47 2011 +0200
@@ -138,6 +138,12 @@
             assert f or g
         getmsg(f, must_pass=True)
 
+    def test_long_chain(self):
+        def f():
+            f = g = h = lambda: True
+            assert f() and g() and h()
+        getmsg(f, must_pass=True)
+
     def test_short_circut_evaluation(self):
         def f():
             assert True or explode

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to