Fix by comparing to str(results)) (#1233)

This commit is contained in:
Jeff Glass
2023-02-27 19:45:24 -06:00
committed by GitHub
parent e2c2459290
commit 065c697070

View File

@@ -43,7 +43,7 @@ class TestAsync(PyScriptTest):
async def get_results():
results = await asyncio.gather(*[coro(d) for d in range(3,0,-1)])
js.console.log(to_js(results))
js.console.log(str(results)) #Compare to string representation, not Proxy
js.console.log("DONE")
asyncio.ensure_future(get_results())
@@ -51,7 +51,7 @@ class TestAsync(PyScriptTest):
"""
)
self.wait_for_console("DONE")
assert self.console.log.lines[-2:] == ["[3,2,1]", "DONE"]
assert self.console.log.lines[-2:] == ["[3, 2, 1]", "DONE"]
def test_multiple_async(self):
self.pyscript_run(