From 984695359797c67f40ce86207aeca5bbba7ee030 Mon Sep 17 00:00:00 2001 From: elizabeth Date: Sun, 2 Aug 2015 17:28:27 +0300 Subject: [PATCH] Support for python 2.6 --- _pytest/python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_pytest/python.py b/_pytest/python.py index 41c5e5cf2..118eea406 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -892,7 +892,7 @@ class Metafunc(FuncargnamesCompatAttr): if scope is None: scope = "function" scopenum = scopes.index(scope) - valtypes = {arg: "funcargs" for arg in argnames} + valtypes = dict.fromkeys(argnames, "funcargs") if not indirect: #XXX should we also check for the opposite case? for arg in argnames: @@ -901,7 +901,7 @@ class Metafunc(FuncargnamesCompatAttr): self.function, arg)) else: if not isinstance(indirect, (tuple, list)): - valtypes = {arg: "params" for arg in argnames} + valtypes = dict.fromkeys(argnames, "params") else: for arg in indirect: if arg not in argnames: