From a63b34c68596e4cddec6d899d8b27417ea4ce72c Mon Sep 17 00:00:00 2001 From: Dmitry Malinovsky Date: Tue, 20 Dec 2016 10:44:09 +0600 Subject: [PATCH] Switch to item fspath --- _pytest/fixtures.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_pytest/fixtures.py b/_pytest/fixtures.py index c2a27b83d..b951ae818 100644 --- a/_pytest/fixtures.py +++ b/_pytest/fixtures.py @@ -783,7 +783,9 @@ class FixtureDef: self.finish() assert not hasattr(self, "cached_result") - hook = self._fixturemanager.session.config.hook + hook = self._fixturemanager.session.gethookproxy( + request._pyfuncitem.fspath + ) return hook.pytest_fixture_setup(fixturedef=self, request=request) def __repr__(self):