Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed JS files for testing webworker into pytest-pyodide wheel #112

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

ryanking13
Copy link
Member

@ryanking13 ryanking13 commented Oct 19, 2023

Similar to #87, embed module_webworker_dev.js and webworker_dev.js files that are used in pytest-pyodide to test webworker functionality. This is used in run_webworker method:

def run_webworker(self, code):
if isinstance(code, str) and code.startswith("\n"):
# we have a multiline string, fix indentation
code = textwrap.dedent(code)
worker_file = (
"webworker_dev.js"
if self.script_type == "classic"
else "module_webworker_dev.js"
)

I need this to run webworker tests with pyodide-core archive in https://github.com/ryanking13/pyodide-recipes-mirror

@ryanking13 ryanking13 merged commit f5b3535 into pyodide:main Dec 9, 2023
34 of 35 checks passed
@ryanking13 ryanking13 deleted the webworker-embed branch December 9, 2023 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant