Exemplo n.º 1
0
 def setup(self):
     service = BasicService()
     try:
         service.kill()
     except ValueError:
         pass
     self.logfile = tempfile.NamedTemporaryFile(delete=False)
     self.logfile.close()
     self.handler = logging.FileHandler(self.logfile.name)
Exemplo n.º 2
0
 def teardown(self):
     service = BasicService()
     try:
         service.kill()
     except ValueError:
         pass
     try:
         os.unlink(self.logfile.name)
     except OSError:
         pass
Exemplo n.º 3
0
 def teardown(self):
     service = BasicService()
     service._debug('teardown')
     try:
         service.kill()
     except ValueError:
         pass
     try:
         os.unlink(self.logfile.name)
     except OSError:
         pass
Exemplo n.º 4
0
 def setup(self):
     with open(LOG_FILE, 'a') as f:
         f.write('\n\n{}\n'.format(get_current_case()))
     service = BasicService()
     try:
         service.kill()
     except ValueError:
         pass
     self.logfile = tempfile.NamedTemporaryFile(delete=False)
     self.logfile.close()
     self.handler = logging.FileHandler(self.logfile.name)