-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: extra test for mismatch in python versions (#2485)
This adds a test for #2481.
- Loading branch information
Showing
3 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[project] | ||
channels = ["conda-forge"] | ||
name = "test" | ||
platforms = ["osx-arm64", "linux-64"] | ||
|
||
[target.linux-64.dependencies] | ||
python = "3.12" | ||
[target.osx-arm64.dependencies] | ||
python = "3.13" | ||
|
||
[pypi-dependencies] | ||
finch-mlir = "==0.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from pathlib import Path | ||
import pytest | ||
import platform | ||
from .common import verify_cli_command, ExitCode | ||
|
||
|
||
@pytest.mark.slow | ||
def test_pypi_git_deps(pixi: Path, tmp_path: Path) -> None: | ||
"""Test where we need to lookup recursive git dependencies and consider them first party""" | ||
test_data = Path(__file__).parent.parent / "data/pixi_tomls/pip_git_dep.toml" | ||
manifest = tmp_path.joinpath("pixi.toml") | ||
toml = test_data.read_text() | ||
manifest.write_text(toml) | ||
|
||
# Run the installation | ||
verify_cli_command( | ||
[pixi, "install", "--manifest-path", manifest], | ||
ExitCode.SUCCESS, | ||
) | ||
|
||
|
||
@pytest.mark.slow | ||
@pytest.mark.skipif( | ||
not (platform.system() == "Darwin" and platform.machine() == "arm64"), | ||
reason="Test tailored for macOS arm so that we can get two different python interpreters", | ||
) | ||
def test_python_mismatch(pixi: Path, tmp_path: Path) -> None: | ||
"""Test pypi wheel install where the base interpreter is not the same as the target version""" | ||
test_data = Path(__file__).parent.parent / "data/pixi_tomls/python_mismatch.toml" | ||
manifest = tmp_path.joinpath("pixi.toml") | ||
toml = test_data.read_text() | ||
manifest.write_text(toml) | ||
|
||
# Install | ||
verify_cli_command( | ||
[pixi, "install", "--manifest-path", manifest], | ||
ExitCode.SUCCESS, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters