示例#1
0
 def _run_test(self, *args, **kwargs):
     from instrumental import api
     from instrumental.recorder import ExecutionRecorder
     ExecutionRecorder.reset()
     c = api.Coverage(self.config, '.')
     modname = kwargs.pop('modname', 'instrumental.test.samples.robust')
     c.start([modname], [])
     if modname in sys.modules:
         testmod = sys.modules[modname]
         reload(testmod)
     else:
         testmod = __import__(modname, fromlist=modname.split('.')[:-1])
     testmod.test_func(*args, **kwargs)
     c.stop()
     return c.recorder
示例#2
0
 def setup(self):
     self.config = DummyConfig()
     ExecutionRecorder.reset()
     ExecutionRecorder.get().start()
示例#3
0
 def setup(self):
     # Reset recorder
     ExecutionRecorder.reset()
示例#4
0
 def setup(self):
     # First clear out the recorder so that we'll create a new one
     ExecutionRecorder.reset()
     self.recorder = ExecutionRecorder.get()
     self.recorder.start()
示例#5
0
 def setup(self):
     # First clear out the recorder so that we'll create a new one
     ExecutionRecorder.reset()
     self.recorder = ExecutionRecorder.get()
     self.config = DummyConfig()
示例#6
0
 def setup(self):
     from instrumental.recorder import ExecutionRecorder
     ExecutionRecorder.reset()
     self._pre_test_modules = sys.modules.keys()
     self.config = DummyConfig()