(pilot: Pilot)
| 120 | return screenshot_path.read_text() |
| 121 | |
| 122 | async def auto_pilot(pilot: Pilot) -> None: |
| 123 | app = pilot.app |
| 124 | if run_before is not None: |
| 125 | result = run_before(pilot) |
| 126 | if inspect.isawaitable(result): |
| 127 | await result |
| 128 | await pilot.pause() |
| 129 | await pilot.press(*press) |
| 130 | if hover: |
| 131 | await pilot.hover(hover) |
| 132 | await pilot.pause(0.5) |
| 133 | if wait_for_animation: |
| 134 | await pilot.wait_for_scheduled_animations() |
| 135 | await pilot.pause() |
| 136 | await pilot.pause() |
| 137 | await pilot.wait_for_scheduled_animations() |
| 138 | svg = app.export_screenshot(title=title, simplify=simplify) |
| 139 | |
| 140 | app.exit(svg) |
| 141 | |
| 142 | svg = cast( |
| 143 | str, |
no test coverage detected
searching dependent graphs…