From 3fdad6d465957d64a537f29fc5fa57c2c0aa2193 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Wed, 5 Feb 2025 09:51:01 +0000 Subject: [PATCH] fix wasm preview --- wasm-preview/run_tests.py | 2 +- wasm-preview/worker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wasm-preview/run_tests.py b/wasm-preview/run_tests.py index 03a26e088..817df0195 100644 --- a/wasm-preview/run_tests.py +++ b/wasm-preview/run_tests.py @@ -37,7 +37,7 @@ async def main(tests_zip: str, tag_name: str): print(f'Mounted {count} test files, installing dependencies...') - await micropip.install(['dirty-equals', 'hypothesis', 'pytest-speed', 'pytest-mock', pydantic_core_wheel, 'tzdata']) + await micropip.install(['dirty-equals', 'hypothesis', 'pytest-speed', 'pytest-mock', 'tzdata', 'inline-snapshot', pydantic_core_wheel]) importlib.invalidate_caches() # print('installed packages:') diff --git a/wasm-preview/worker.js b/wasm-preview/worker.js index 93508f1c2..13414cdb5 100644 --- a/wasm-preview/worker.js +++ b/wasm-preview/worker.js @@ -97,7 +97,7 @@ async function main() { setupStreams(FS, pyodide._module.TTY); FS.mkdir('/test_dir'); FS.chdir('/test_dir'); - await pyodide.loadPackage(['micropip', 'pytest', 'numpy']); + await pyodide.loadPackage(['micropip', 'pytest', 'numpy', 'pygments']); if (pydantic_core_version < '2.0.0') await pyodide.loadPackage(['typing-extensions']); await pyodide.runPythonAsync(python_code, {globals: pyodide.toPy({pydantic_core_version, tests_zip})}); post();