Example #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)
Example #2
0
 def teardown(self):
     service = BasicService()
     try:
         service.kill()
     except ValueError:
         pass
     try:
         os.unlink(self.logfile.name)
     except OSError:
         pass
Example #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
Example #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)