Ejemplo n.º 1
0
 def run(self):
     reset_signals(full=False)
     platforms.close_open_fds([
         sys.__stdin__, sys.__stdout__, sys.__stderr__,
     ] + list(iter_open_logger_fds()))
     self.app.set_default()
     self.app.set_current()
     self.service.start(embedded_process=True)
Ejemplo n.º 2
0
 def run(self):
     reset_signals(full=False)
     platforms.close_open_fds([
         sys.__stdin__, sys.__stdout__, sys.__stderr__,
     ] + list(iter_open_logger_fds()))
     self.app.set_default()
     self.app.set_current()
     self.service.start(embedded_process=True)
Ejemplo n.º 3
0
 def assert_context(self, sigs, get_returns=None, set_effect=None):
     with termsigs(*sigs):
         with patch('signal.getsignal') as GET:
             with patch('signal.signal') as SET:
                 GET.return_value = get_returns
                 SET.side_effect = set_effect
                 reset_signals()
                 GET.assert_has_calls([call(signo(sig)) for sig in sigs])
                 yield GET, SET
Ejemplo n.º 4
0
 def assert_context(self, default, full, get_returns=None, set_effect=None):
     with termsigs(default, full):
         with patch("signal.getsignal") as GET:
             with patch("signal.signal") as SET:
                 GET.return_value = get_returns
                 SET.side_effect = set_effect
                 reset_signals()
                 GET.assert_has_calls([call(signo(sig)) for sig in default])
                 yield GET, SET
Ejemplo n.º 5
0
 def assert_context(self, sigs, get_returns=None, set_effect=None):
     with termsigs(*sigs):
         with patch('signal.getsignal') as GET:
             with patch('signal.signal') as SET:
                 GET.return_value = get_returns
                 SET.side_effect = set_effect
                 reset_signals()
                 GET.assert_has_calls([
                     call(signo(sig)) for sig in sigs
                 ])
                 yield GET, SET