(predicate: Callable[[], bool], timeout: float, interval: float = 1.0)
| 278 | |
| 279 | |
| 280 | def wait_for(predicate: Callable[[], bool], timeout: float, interval: float = 1.0) -> bool: |
| 281 | deadline = time.time() + timeout |
| 282 | while time.time() < deadline: |
| 283 | if predicate(): |
| 284 | return True |
| 285 | time.sleep(interval) |
| 286 | return predicate() |
| 287 | |
| 288 | |
| 289 | def powershell_file(script_name: str, timeout: int = 60) -> subprocess.CompletedProcess[str]: |
no outgoing calls
no test coverage detected