mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
Fix test_async and test_stdio_handling (#1319)
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until schedule_deferred_tasks is called, we defer tasks started by user code. schedule_deferred_tasks starts all deferred user tasks and switches to immediately scheduling any further user tasks.
This commit is contained in:
@@ -414,6 +414,7 @@ modules must contain a "plugin" attribute. For more information check the plugin
|
||||
this.incrementPendingTags();
|
||||
this.decrementPendingTags();
|
||||
await this.scriptTagsPromise;
|
||||
await this.interpreter._remote.pyscript_py._schedule_deferred_tasks();
|
||||
}
|
||||
|
||||
// ================= registraton API ====================
|
||||
|
||||
Reference in New Issue
Block a user