Support for python 2.6

This commit is contained in:
elizabeth 2015-08-02 17:28:27 +03:00
parent 2fc7aede0b
commit 9846953597
1 changed files with 2 additions and 2 deletions

View File

@ -892,7 +892,7 @@ class Metafunc(FuncargnamesCompatAttr):
if scope is None: if scope is None:
scope = "function" scope = "function"
scopenum = scopes.index(scope) scopenum = scopes.index(scope)
valtypes = {arg: "funcargs" for arg in argnames} valtypes = dict.fromkeys(argnames, "funcargs")
if not indirect: if not indirect:
#XXX should we also check for the opposite case? #XXX should we also check for the opposite case?
for arg in argnames: for arg in argnames:
@ -901,7 +901,7 @@ class Metafunc(FuncargnamesCompatAttr):
self.function, arg)) self.function, arg))
else: else:
if not isinstance(indirect, (tuple, list)): if not isinstance(indirect, (tuple, list)):
valtypes = {arg: "params" for arg in argnames} valtypes = dict.fromkeys(argnames, "params")
else: else:
for arg in indirect: for arg in indirect:
if arg not in argnames: if arg not in argnames: