Skip to content

Commit

Permalink
Fix for pyodide test failure, refs #2351
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 12, 2024
1 parent a0a9b80 commit ead2882
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test-in-pyodide-with-shot-scraper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ cd dist
python3 -m http.server 8529 &
cd ..

# Register the kill_server function to be called on script exit
kill_server() {
pkill -f 'http.server 8529'
}
trap kill_server EXIT


shot-scraper javascript http://localhost:8529/ "
async () => {
let pyodide = await loadPyodide();
Expand All @@ -26,6 +33,8 @@ async () => {
import micropip
await micropip.install('h11==0.12.0')
await micropip.install('httpx==0.23')
# To avoid 'from typing_extensions import deprecated' error:
await micropip.install('typing-extensions>=4.12.2')
await micropip.install('http://localhost:8529/$wheel')
import ssl
import setuptools
Expand All @@ -38,7 +47,4 @@ async () => {
}
return 'Test passed!';
}
"

# Shut down the server
pkill -f 'http.server 8529'
"

0 comments on commit ead2882

Please sign in to comment.