Test that App.run accepts a loop argument.
()
| 349 | |
| 350 | |
| 351 | def test_app_loop() -> None: |
| 352 | """Test that App.run accepts a loop argument.""" |
| 353 | |
| 354 | class MyApp(App[int]): |
| 355 | def on_mount(self) -> None: |
| 356 | self.exit(42) |
| 357 | |
| 358 | app = MyApp() |
| 359 | result = app.run(loop=asyncio.new_event_loop()) |
| 360 | assert result == 42 |
| 361 | |
| 362 | |
| 363 | async def test_app_run_async() -> None: |