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
This commit is contained in:
Andreas Zeidler
2013-03-20 16:36:48 +01:00
parent 25547e3afb
commit f747d363b0

View File

@@ -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):