docs: Create links for objects to show the api

This commit is contained in:
ApaDoctor 2017-06-06 01:10:32 +02:00
parent 5ee9793c99
commit 54a90e9555
4 changed files with 8 additions and 8 deletions

View File

@ -169,7 +169,7 @@ def _prepareconfig(args=None, plugins=None):
class PytestPluginManager(PluginManager): class PytestPluginManager(PluginManager):
""" """
Overwrites :py:class:`pluggy.PluginManager` to add pytest-specific Overwrites :py:class:`pluggy.PluginManager <_pytest.vendored_packages.pluggy.PluginManager>` to add pytest-specific
functionality: functionality:
* loading plugins from the command line, ``PYTEST_PLUGIN`` env variable and * loading plugins from the command line, ``PYTEST_PLUGIN`` env variable and
@ -206,7 +206,7 @@ class PytestPluginManager(PluginManager):
""" """
.. deprecated:: 2.8 .. deprecated:: 2.8
Use :py:meth:`pluggy.PluginManager.add_hookspecs` instead. Use :py:meth:`pluggy.PluginManager.add_hookspecs <_pytest.vendored_packages.pluggy.PluginManager.add_hookspecs>` instead.
""" """
warning = dict(code="I2", warning = dict(code="I2",
fslocation=_pytest._code.getfslineno(sys._getframe(1)), fslocation=_pytest._code.getfslineno(sys._getframe(1)),
@ -1130,7 +1130,7 @@ class Config(object):
def getini(self, name): def getini(self, name):
""" return configuration value from an :ref:`ini file <inifiles>`. If the """ return configuration value from an :ref:`ini file <inifiles>`. If the
specified name hasn't been registered through a prior specified name hasn't been registered through a prior
:py:func:`parser.addini <pytest.config.Parser.addini>` :py:func:`parser.addini <_pytest.config.Parser.addini>`
call (usually from a plugin), a ValueError is raised. """ call (usually from a plugin), a ValueError is raised. """
try: try:
return self._inicache[name] return self._inicache[name]

View File

@ -213,7 +213,7 @@ def pytest_runtest_teardown(item, nextitem):
@hookspec(firstresult=True) @hookspec(firstresult=True)
def pytest_runtest_makereport(item, call): def pytest_runtest_makereport(item, call):
""" return a :py:class:`_pytest.runner.TestReport` object """ return a :py:class:`_pytest.runner.TestReport` object
for the given :py:class:`pytest.Item` and for the given :py:class:`pytest.Item <_pytest.main.Item>` and
:py:class:`_pytest.runner.CallInfo`. :py:class:`_pytest.runner.CallInfo`.
""" """

View File

@ -540,7 +540,7 @@ class PluginManager(object):
of HookImpl instances and the keyword arguments for the hook call. of HookImpl instances and the keyword arguments for the hook call.
``after(outcome, hook_name, hook_impls, kwargs)`` receives the ``after(outcome, hook_name, hook_impls, kwargs)`` receives the
same arguments as ``before`` but also a :py:class:`_CallOutcome`` object same arguments as ``before`` but also a :py:class:`_CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` object
which represents the result of the overall hook call. which represents the result of the overall hook call.
""" """
return _TracedHookExecution(self, before, after).undo return _TracedHookExecution(self, before, after).undo

View File

@ -383,7 +383,7 @@ hook wrappers and passes the same arguments as to the regular hooks.
At the yield point of the hook wrapper pytest will execute the next hook At the yield point of the hook wrapper pytest will execute the next hook
implementations and return their result to the yield point in the form of implementations and return their result to the yield point in the form of
a :py:class:`CallOutcome` instance which encapsulates a result or a :py:class:`CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` instance which encapsulates a result or
exception info. The yield point itself will thus typically not raise exception info. The yield point itself will thus typically not raise
exceptions (unless there are bugs). exceptions (unless there are bugs).
@ -448,7 +448,7 @@ Here is the order of execution:
Plugin1). Plugin1).
4. Plugin3's pytest_collection_modifyitems then executing the code after the yield 4. Plugin3's pytest_collection_modifyitems then executing the code after the yield
point. The yield receives a :py:class:`CallOutcome` instance which encapsulates point. The yield receives a :py:class:`CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` instance which encapsulates
the result from calling the non-wrappers. Wrappers shall not modify the result. the result from calling the non-wrappers. Wrappers shall not modify the result.
It's possible to use ``tryfirst`` and ``trylast`` also in conjunction with It's possible to use ``tryfirst`` and ``trylast`` also in conjunction with
@ -525,7 +525,7 @@ Initialization, command line and configuration hooks
Generic "runtest" hooks Generic "runtest" hooks
----------------------- -----------------------
All runtest related hooks receive a :py:class:`pytest.Item` object. All runtest related hooks receive a :py:class:`pytest.Item <_pytest.main.Item>` object.
.. autofunction:: pytest_runtest_protocol .. autofunction:: pytest_runtest_protocol
.. autofunction:: pytest_runtest_setup .. autofunction:: pytest_runtest_setup