Refactor the test examples to parametrize per installer type#1266
Open
lrandersson wants to merge 2 commits into
Open
Refactor the test examples to parametrize per installer type#1266lrandersson wants to merge 2 commits into
lrandersson wants to merge 2 commits into
Conversation
Contributor
Author
|
We can now see in the macOS CI output (as an example): |
marcoesters
reviewed
Jun 22, 2026
| "generate the Dockerfile without building the portable image." | ||
| ) | ||
| if installer_type: | ||
| if installer_type not in itypes: |
Contributor
There was a problem hiding this comment.
itypes are the installer types that are read from the construct.yaml file. What this does is ensure that --installer-type is consistent with what you have in the construct.yaml file.
I think what you actually want is to do something like this:
if installer_type:
info["installer_type"] installer_type
itypes = get_installer_type(info)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Solves #1146. The file
test_examples.pyruns every applicable installer type for an example in a single constructor call and loops over them, which interleaves build/run output and gives no test isolation. When one type fails, the others are masked or skipped, making CI failures painful to debug.This PR adds the infrastructure to run each installer type as its own pytest item:
--installer-typeto allow testing a specific installer type via the CLIinstaller_typesfield in each example recipe).test_example_miniforge(split intominiforgeandminiforge-mamba2, each parametrized over its own recipe's types).The remaining example tests are intentionally left unchanged here to keep this PR small and easy to review. A follow-up PR is expected once this is approved and merged.
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?