Merge pull request #5011 from blueyed/merge-master-into-features

Merge master into features
This commit is contained in:
Daniel Hahler
2019-03-29 18:35:13 +01:00
committed by GitHub
5 changed files with 26 additions and 24 deletions

View File

@@ -99,7 +99,8 @@ def pytest_cmdline_parse(pluginmanager, args):
Stops at first non-None result, see :ref:`firstresult`
.. note::
This hook will not be called for ``conftest.py`` files, only for setuptools plugins.
This hook will only be called for plugin classes passed to the ``plugins`` arg when using `pytest.main`_ to
perform an in-process test run.
:param _pytest.config.PytestPluginManager pluginmanager: pytest plugin manager
:param list[str] args: list of arguments passed on the command line

View File

@@ -335,6 +335,15 @@ def testdir(request, tmpdir_factory):
return Testdir(request, tmpdir_factory)
@pytest.fixture
def _config_for_test():
from _pytest.config import get_config
config = get_config()
yield config
config._ensure_unconfigure() # cleanup, e.g. capman closing tmpfiles.
rex_outcome = re.compile(r"(\d+) ([\w-]+)")