Deprecate calling fixture functions directly

This will now issue a RemovedInPytest4Warning when the user calls
a fixture function directly, instead of requesting it from test
functions as is expected

Fix #3661
This commit is contained in:
Bruno Oliveira
2018-07-22 11:10:44 -03:00
parent f8749eeb5c
commit 011f88f7e7
11 changed files with 103 additions and 42 deletions
+1
View File
@@ -84,6 +84,7 @@ def iscoroutinefunction(func):
def getlocation(function, curdir):
function = get_real_func(function)
fn = py.path.local(inspect.getfile(function))
lineno = function.__code__.co_firstlineno
if fn.relto(curdir):