(self, should_stop)
| 216 | |
| 217 | @pytest.mark.parametrize('should_stop', (None, False, True, EX_OK)) |
| 218 | def test_should_terminate(self, should_stop): |
| 219 | x = X(self.app) |
| 220 | state.should_stop = should_stop |
| 221 | state.should_terminate = True |
| 222 | try: |
| 223 | with pytest.raises(WorkerTerminate): |
| 224 | asynloop(*x.args) |
| 225 | finally: |
| 226 | state.should_stop = None |
| 227 | state.should_terminate = None |
| 228 | |
| 229 | def test_should_terminate_hub_close_raises(self): |
| 230 | x = X(self.app) |