fix: 'sleep' function assertion

This commit is contained in:
2026-04-22 17:08:21 +08:00
parent 299b98bc30
commit cb771fbf80

View File

@@ -21,7 +21,7 @@ def until(condition: typing.Callable[[WebDriver], bool], watch=True):
def sleep(seconds: float):
from common.jsonrpc2.server import connection
assert connection is not None and connection.closed is not None
assert connection is not None and connection.closed is None
try: WebDriverWait(driver, seconds, seconds).until(lambda _: False)
except: pass