Fix use of deprecated getfuncargvalue method in the internal doctest plugin

Fix #1898
This commit is contained in:
Bruno Oliveira 2016-09-01 07:19:11 -04:00
parent a9f3053f72
commit 4e58c9a7d0
2 changed files with 6 additions and 1 deletions

View File

@ -21,16 +21,21 @@
enabled. This allows proper post mortem debugging for all applications
which have significant logic in their tearDown machinery (`#1890`_). Thanks
`@mbyt`_ for the PR.
* Fix use of deprecated ``getfuncargvalue`` method in the internal doctest plugin.
Thanks `@ViviCoder`_ for the report (`#1898`_).
.. _@joguSD: https://github.com/joguSD
.. _@AiOO: https://github.com/AiOO
.. _@mbyt: https://github.com/mbyt
.. _@ViviCoder: https://github.com/ViviCoder
.. _#1857: https://github.com/pytest-dev/pytest/issues/1857
.. _#1864: https://github.com/pytest-dev/pytest/issues/1864
.. _#1888: https://github.com/pytest-dev/pytest/issues/1888
.. _#1891: https://github.com/pytest-dev/pytest/pull/1891
.. _#1890: https://github.com/pytest-dev/pytest/issues/1890
.. _#1898: https://github.com/pytest-dev/pytest/issues/1898
3.0.1

View File

@ -88,7 +88,7 @@ class DoctestItem(pytest.Item):
if self.dtest is not None:
self.fixture_request = _setup_fixtures(self)
globs = dict(getfixture=self.fixture_request.getfixturevalue)
for name, value in self.fixture_request.getfuncargvalue('doctest_namespace').items():
for name, value in self.fixture_request.getfixturevalue('doctest_namespace').items():
globs[name] = value
self.dtest.globs.update(globs)