From f747d363b0a090d428f77b3b39e6af7d0171d7cc Mon Sep 17 00:00:00 2001 From: Andreas Zeidler Date: Wed, 20 Mar 2013 16:36:48 +0100 Subject: [PATCH] don't expose the `FixtureRequest` object itself in doctests. in most cases `get_fixture` is sufficient, and you can always call `get_fixture('request')` anyway --HG-- branch : doctest-fixtures --- _pytest/doctest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_pytest/doctest.py b/_pytest/doctest.py index e447b8faf..87ecca7b3 100644 --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -78,8 +78,7 @@ class DoctestTextfile(DoctestItem, pytest.File): failed, tot = doctest.testfile( str(self.fspath), module_relative=False, optionflags=doctest.ELLIPSIS, - extraglobs=dict(fixture_request=fixture_request, - get_fixture=fixture_request.getfuncargvalue), + extraglobs=dict(get_fixture=fixture_request.getfuncargvalue), raise_on_error=True, verbose=0) class DoctestModule(DoctestItem, pytest.File):