Skip to content

Commit

Permalink
add minimal test
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Jan 24, 2025
1 parent e50f58c commit 57de68c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,29 @@ def test_install_mixed_case2(selenium_standalone_micropip, jinja2):
)


def test_install_constraints(selenium_standalone_micropip):
selenium = selenium_standalone_micropip
selenium.run_js(
"""
await pyodide.runPythonAsync(`
import micropip
await micropip.install(
"pytz",
constraints=["pytz == 2020.5"]
);
`);
"""
)
selenium.run_js(
"""
await pyodide.runPythonAsync(`
import pytz
assert pytz.__version__ == "2020.5"
`);
"""
)


@pytest.mark.asyncio
async def test_package_with_extra(mock_fetch):
mock_fetch.add_pkg_version("depa")
Expand Down

0 comments on commit 57de68c

Please sign in to comment.