Remove config.warn, Node.warn; pytest_logwarning issues a warning when implemented

Fix #3078
This commit is contained in:
Bruno Oliveira
2018-12-11 20:02:36 -02:00
parent 26d202a7bd
commit fd48cd57f9
20 changed files with 109 additions and 271 deletions

View File

@@ -278,11 +278,11 @@ class AssertionRewritingHook(object):
def _warn_already_imported(self, name):
from _pytest.warning_types import PytestWarning
from _pytest.warnings import _issue_config_warning
from _pytest.warnings import _issue_warning_captured
_issue_config_warning(
_issue_warning_captured(
PytestWarning("Module already imported so cannot be rewritten: %s" % name),
self.config,
self.config.hook,
stacklevel=5,
)