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

Add test for micropip.freeze() after installation without dependencies #196

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
pyodide-version: ["0.27.2"]
pyodide-version: ["0.27.0a2"]
test-config: [
# FIXME: recent version of chrome gets timeout
{ runner: selenium, runtime: chrome, runtime-version: "125" },
Expand All @@ -31,8 +31,10 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# with:
# submodules: recursive
with:
submodules: recursive
ref: v0.8.0

- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
Expand All @@ -54,6 +56,27 @@ jobs:
run: |
python3 -m pip install -e .[test]

- name: Add this test to the end of the test_install.py file
shell: bash -l {0}
run: |
cat << 'EOF' >> tests/test_install.py

def test_freeze_after_install_without_deps(selenium_standalone_micropip, wheel_catalog):
selenium = selenium_standalone_micropip
shapely = wheel_catalog.get("shapely")

selenium.run_js(
f"""
await pyodide.runPythonAsync(`
import micropip
await micropip.install("{shapely.url}", deps=False)
micropip.freeze()
`);
"""
)
EOF


- name: Run tests
shell: bash -l {0}
run: |
Expand Down
15 changes: 15 additions & 0 deletions tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,18 @@ async def run(selenium, numpy_url, shapely_url):
Point(0, 0)

run(selenium, numpy_wheel.url, shapely_wheel.url)


def test_freeze_after_install_without_deps(selenium_standalone_micropip, wheel_catalog):
selenium = selenium_standalone_micropip
shapely = wheel_catalog.get("shapely")

selenium.run_js(
f"""
await pyodide.runPythonAsync(`
import micropip
await micropip.install("{shapely.url}", deps=False)
micropip.freeze()
`);
"""
)
Loading