Skip to content

Commit

Permalink
fix wasm preview (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Feb 5, 2025
1 parent fdccecd commit 3707dcd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
'Operating System :: MacOS',
'Typing :: Typed',
]
dependencies = ['typing-extensions >=4.6.0,!=4.7.0']
dependencies = ['typing-extensions>=4.6.0,!=4.7.0']
dynamic = ['description', 'license', 'readme', 'version']

[project.urls]
Expand Down
4 changes: 3 additions & 1 deletion wasm-preview/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ 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:')
Expand Down
2 changes: 1 addition & 1 deletion wasm-preview/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3707dcd

Please sign in to comment.