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