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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user