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:
parent
25547e3afb
commit
f747d363b0
|
@ -78,8 +78,7 @@ class DoctestTextfile(DoctestItem, pytest.File):
|
||||||
failed, tot = doctest.testfile(
|
failed, tot = doctest.testfile(
|
||||||
str(self.fspath), module_relative=False,
|
str(self.fspath), module_relative=False,
|
||||||
optionflags=doctest.ELLIPSIS,
|
optionflags=doctest.ELLIPSIS,
|
||||||
extraglobs=dict(fixture_request=fixture_request,
|
extraglobs=dict(get_fixture=fixture_request.getfuncargvalue),
|
||||||
get_fixture=fixture_request.getfuncargvalue),
|
|
||||||
raise_on_error=True, verbose=0)
|
raise_on_error=True, verbose=0)
|
||||||
|
|
||||||
class DoctestModule(DoctestItem, pytest.File):
|
class DoctestModule(DoctestItem, pytest.File):
|
||||||
|
|
Loading…
Reference in New Issue