parent
d1b45ef3d4
commit
1771cb0af8
|
@ -505,7 +505,7 @@ class ShowFuncargSession(Session):
|
||||||
def getlocation(self, function):
|
def getlocation(self, function):
|
||||||
import inspect
|
import inspect
|
||||||
fn = py.path.local(inspect.getfile(function))
|
fn = py.path.local(inspect.getfile(function))
|
||||||
lineno = function.func_code.co_firstlineno
|
lineno = py.builtin._getcode(function).co_firstlineno
|
||||||
if fn.relto(self.fspath):
|
if fn.relto(self.fspath):
|
||||||
fn = fn.relto(self.fspath)
|
fn = fn.relto(self.fspath)
|
||||||
return "%s:%d" %(fn, lineno+1)
|
return "%s:%d" %(fn, lineno+1)
|
||||||
|
|
Loading…
Reference in New Issue