(predicate, timeout=RESULT_TIMEOUT, interval=0.5)
| 6 | |
| 7 | |
| 8 | def _wait_until(predicate, timeout=RESULT_TIMEOUT, interval=0.5): |
| 9 | deadline = time.monotonic() + timeout |
| 10 | result = predicate() |
| 11 | while not result and time.monotonic() < deadline: |
| 12 | time.sleep(interval) |
| 13 | result = predicate() |
| 14 | return result |
| 15 | |
| 16 | |
| 17 | class test_query_task: |
no test coverage detected