Adjust stacklevel of "config" warnings

Related to #4439
This commit is contained in:
Bruno Oliveira
2018-11-22 14:44:01 -02:00
parent 45c33c4e05
commit aa765cf8c2
7 changed files with 14 additions and 7 deletions

View File

@@ -270,6 +270,7 @@ class AssertionRewritingHook(object):
_issue_config_warning(
PytestWarning("Module already imported so cannot be rewritten: %s" % name),
self.config,
stacklevel=5,
)
def load_module(self, name):