Encapsulates the StubRunner in a context manager so its run function is called when the context is exited.
()
| 191 | |
| 192 | @pytest.fixture |
| 193 | def stub_runner(): |
| 194 | """ |
| 195 | Encapsulates the StubRunner in a context manager so its run function is called |
| 196 | when the context is exited. |
| 197 | """ |
| 198 | |
| 199 | @contextlib.contextmanager |
| 200 | def _runner(err, stop): |
| 201 | runner = StubRunner(err, stop) |
| 202 | yield runner |
| 203 | runner.run() |
| 204 | |
| 205 | return _runner |
| 206 | |
| 207 | |
| 208 | class InputMocker: |
no outgoing calls