2 new changesets in pytest: http://bitbucket.org/hpk42/pytest/changeset/4b05174b6773/ changeset: 4b05174b6773 user: gutworth date: 2011-07-14 18:45:42 summary: fix assertion rewriting on calls with a double-star arg affected #: 3 files (178 bytes)
--- a/CHANGELOG Wed Jul 13 13:34:24 2011 -0500 +++ b/CHANGELOG Thu Jul 14 11:45:42 2011 -0500 @@ -1,6 +1,7 @@ Changes between 2.1.0 and 2.1.1.DEV ---------------------------------------------- +- fix assertion rewriting on calls with a ** arg - don't cache rewritten modules if bytecode generation is disabled - fix assertion rewriting in read-only directories - fix issue59: provide system-out/err tags for junitxml output --- a/_pytest/assertion/rewrite.py Wed Jul 13 13:34:24 2011 -0500 +++ b/_pytest/assertion/rewrite.py Thu Jul 14 11:45:42 2011 -0500 @@ -514,7 +514,7 @@ new_star, expl = self.visit(call.starargs) arg_expls.append("*" + expl) if call.kwargs: - new_kwarg, expl = self.visit(call.kwarg) + new_kwarg, expl = self.visit(call.kwargs) arg_expls.append("**" + expl) expl = "%s(%s)" % (func_expl, ', '.join(arg_expls)) new_call = ast.Call(new_func, new_args, new_kwargs, new_star, new_kwarg) --- a/testing/test_assertrewrite.py Wed Jul 13 13:34:24 2011 -0500 +++ b/testing/test_assertrewrite.py Thu Jul 14 11:45:42 2011 -0500 @@ -195,6 +195,10 @@ def f(): assert g(1, 3, g=23) assert getmsg(f, ns) == """assert g(1, 3, g=23)""" + def f(): + x = "a" + assert g(**{x : 2}) + assert getmsg(f, ns) == """assert g(**{'a': 2})""" def test_attribute(self): class X(object): http://bitbucket.org/hpk42/pytest/changeset/a7db87f7a262/ changeset: a7db87f7a262 user: gutworth date: 2011-07-14 18:46:32 summary: add a test for vararg call affected #: 1 file (131 bytes) --- a/testing/test_assertrewrite.py Thu Jul 14 11:45:42 2011 -0500 +++ b/testing/test_assertrewrite.py Thu Jul 14 11:46:32 2011 -0500 @@ -196,6 +196,10 @@ assert g(1, 3, g=23) assert getmsg(f, ns) == """assert g(1, 3, g=23)""" def f(): + seq = [1, 2, 3] + assert g(*seq) + assert getmsg(f, ns) == """assert g(*[1, 2, 3])""" + def f(): x = "a" assert g(**{x : 2}) assert getmsg(f, ns) == """assert g(**{'a': 2})""" 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