From b061e71da9de1d302a4952710dbd569959326f17 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 24 May 2011 18:28:20 -0500 Subject: [PATCH] account for py3 dict.values --- _pytest/assertrewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/assertrewrite.py b/_pytest/assertrewrite.py index 04d20dd5c..e0f9507c2 100644 --- a/_pytest/assertrewrite.py +++ b/_pytest/assertrewrite.py @@ -180,7 +180,7 @@ class AssertionRewriter(ast.NodeVisitor): if self.stack: self.explanation_specifiers = self.stack[-1] keys = [ast.Str(key) for key in current.keys()] - format_dict = ast.Dict(keys, current.values()) + format_dict = ast.Dict(keys, list(current.values())) form = ast.BinOp(expl_expr, ast.Mod(), format_dict) name = "@py_format" + str(next(self.variable_counter)) self.on_failure.append(ast.Assign([ast.Name(name, ast.Store())], form))