parent
f4b4f68b40
commit
ee72091783
|
@ -60,21 +60,19 @@ class ApigenExecutor(RunExecutor):
|
||||||
self.tracer = tracer
|
self.tracer = tracer
|
||||||
return super(ApigenExecutor, self).execute()
|
return super(ApigenExecutor, self).execute()
|
||||||
|
|
||||||
def wrap_underlaying(self, target):
|
def wrap_underlaying(self, target, *args):
|
||||||
def f(*args):
|
|
||||||
try:
|
try:
|
||||||
self.tracer.start_tracing()
|
self.tracer.start_tracing()
|
||||||
return target(*args)
|
return target(*args)
|
||||||
finally:
|
finally:
|
||||||
self.tracer.end_tracing()
|
self.tracer.end_tracing()
|
||||||
return f
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
""" We want to trace *only* function objects here. Unsure
|
""" We want to trace *only* function objects here. Unsure
|
||||||
what to do with custom collectors at all
|
what to do with custom collectors at all
|
||||||
"""
|
"""
|
||||||
if hasattr(self.item, 'obj') and type(self.item.obj) is py.test.Function:
|
if hasattr(self.item, 'obj') and type(self.item) is py.test.Function:
|
||||||
self.item.obj = self.wrap_underlaying(self.item.obj)
|
self.item.execute = self.wrap_underlaying
|
||||||
self.item.run()
|
self.item.run()
|
||||||
|
|
||||||
class BoxExecutor(RunExecutor):
|
class BoxExecutor(RunExecutor):
|
||||||
|
|
Loading…
Reference in New Issue