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
def setup(self): self.config = DummyConfig() ExecutionRecorder.reset() ExecutionRecorder.get().start()
def setup(self): # Reset recorder ExecutionRecorder.reset()
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()
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()
def setup(self): from instrumental.recorder import ExecutionRecorder ExecutionRecorder.reset() self._pre_test_modules = sys.modules.keys() self.config = DummyConfig()