Skip to content

Commit

Permalink
add test for the failing case
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Oct 16, 2024
1 parent 2579bd6 commit 633b4c2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test-data/recipes/pin_subpackage/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# regression test that pin subpackage works with `my.package`
context:
name: my.package
version: 0.1.0

recipe:
version: ${{ version }}
build:
number: 0

outputs:
- package:
name: ${{ name }}
build:
noarch: generic

- package:
name: ${{ name }}-a
build:
noarch: generic
requirements:
run:
- ${{ pin_subpackage(name, exact=true) }}
11 changes: 11 additions & 0 deletions test/end-to-end/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,3 +998,14 @@ def test_env_vars_override(rattler_build: RattlerBuild, recipes: Path, tmp_path:
"variant": "pybind11-abi",
"spec": "pybind11-abi 4.*",
}


def test_pin_subpackage(
rattler_build: RattlerBuild, recipes: Path, tmp_path: Path, snapshot_json
):
rattler_build.build(
recipes / "pin_subpackage",
tmp_path,
)
pkg = get_extracted_package(tmp_path, "my.package-a")
assert (pkg / "info/index.json").exists()

0 comments on commit 633b4c2

Please sign in to comment.