From c220fb235a08d1e5ae892c10566a350a8a08a89b Mon Sep 17 00:00:00 2001 From: Serhii Mozghovyi Date: Thu, 28 Jun 2018 14:53:06 +0300 Subject: [PATCH] Minor fix (code improvement) --- src/_pytest/fixtures.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index c0eb2e287..55df7e9d1 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -310,9 +310,7 @@ class FuncFixtureInfo(object): if argname in self.name2fixturedefs: working_set.update(self.name2fixturedefs[argname][-1].argnames) - self.names_closure[:] = sorted( - closure, key=lambda name: self.names_closure.index(name) - ) + self.names_closure[:] = sorted(closure, key=self.names_closure.index) class FixtureRequest(FuncargnamesCompatAttr):