(predicate, timeout, description)
| 57 | |
| 58 | |
| 59 | def wait_until(predicate, timeout, description): |
| 60 | deadline = time.monotonic() + timeout |
| 61 | while time.monotonic() < deadline: |
| 62 | if predicate(): |
| 63 | return |
| 64 | time.sleep(0.1) |
| 65 | raise SmokeFailure("timed out waiting for " + description) |
| 66 | |
| 67 | |
| 68 | def sha256_file(path): |
no test coverage detected