Create a worker for testing.
(self)
| 137 | """Tests for signal handling in tornado worker.""" |
| 138 | |
| 139 | def create_worker(self): |
| 140 | """Create a worker for testing.""" |
| 141 | cfg = Config() |
| 142 | cfg.set('workers', 1) |
| 143 | |
| 144 | worker = gtornado.TornadoWorker( |
| 145 | age=1, |
| 146 | ppid=os.getpid(), |
| 147 | sockets=[], |
| 148 | app=mock.Mock(), |
| 149 | timeout=30, |
| 150 | cfg=cfg, |
| 151 | log=mock.Mock(), |
| 152 | ) |
| 153 | return worker |
| 154 | |
| 155 | def test_handle_exit_sets_alive_false(self): |
| 156 | """Test that handle_exit sets alive=False through parent.""" |
no test coverage detected