Implement hack to issue warnings during config

Once we can capture warnings during the config stage, we can
then get rid of this function

Related to #2891
This commit is contained in:
Bruno Oliveira
2018-09-03 19:27:46 -03:00
parent 60499d221e
commit 0fffa6ba2f
7 changed files with 64 additions and 42 deletions

View File

@@ -31,10 +31,10 @@ def pytest_configure(config):
config.pluginmanager.register(config._resultlog)
from _pytest.deprecated import RESULT_LOG
import warnings
from _pytest.warning_types import RemovedInPytest4Warning
from _pytest.warnings import _issue_config_warning
warnings.warn(RESULT_LOG, RemovedInPytest4Warning)
_issue_config_warning(RemovedInPytest4Warning(RESULT_LOG), config)
def pytest_unconfigure(config):