From a3aebfaefe366d19fafd65588475993e34d096d4 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 22 Apr 2015 21:04:36 +0200 Subject: [PATCH] accomodate Floris' comments. (The reason was i just reinstanted the old code :) --HG-- branch : reintroduce_pytest_fixture --- _pytest/pytester.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_pytest/pytester.py b/_pytest/pytester.py index 404e07fa9..0a85d3d60 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -16,7 +16,12 @@ from _pytest.core import HookCaller, add_method_wrapper from _pytest.main import Session, EXIT_OK # used at least by pytest-xdist plugin -def pytest_funcarg___pytest(request): +@pytest.fixture +def _pytest(request): + """ Return a helper which offers a gethookrecorder(hook) + method which returns a HookRecorder instance which helps + to make assertions about called hooks. + """ return PytestArg(request) class PytestArg: