diff --git a/_pytest/assertion/newinterpret.py b/_pytest/assertion/newinterpret.py index d8b27784d..c8d999d48 100644 --- a/_pytest/assertion/newinterpret.py +++ b/_pytest/assertion/newinterpret.py @@ -243,13 +243,13 @@ class DebugInterpreter(ast.NodeVisitor): keyword_source = "%s=%%s" % (keyword.arg) arguments.append(keyword_source % (arg_name,)) arg_explanations.append(keyword_source % (arg_explanation,)) - if call.starargs: + if sys.version_info <= (3,4) and call.starargs: arg_explanation, arg_result = self.visit(call.starargs) arg_name = "__exprinfo_star" ns[arg_name] = arg_result arguments.append("*%s" % (arg_name,)) arg_explanations.append("*%s" % (arg_explanation,)) - if call.kwargs: + if sys.version_info <= (3,4) and call.kwargs: arg_explanation, arg_result = self.visit(call.kwargs) arg_name = "__exprinfo_kwds" ns[arg_name] = arg_result