Conversation
for_collections() only matched element_tests, so an output spelled class: Collection + elements: fell through to the file checker. And from_dict() drops top-level collection_type, so the type was never asserted - from_yaml_test_format() maps it onto attributes["type"]. Fixes galaxyproject#1705 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Only `element_tests` and `class: Collection` declare a collection output. `elements` stays an alias resolved by from_yaml_test_format once the output is known to be a collection. Add coverage for the class-only spelling (element_count with no element_tests), which nothing detected before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jmchilton
marked this pull request as ready for review
September 22, 2026 17:23
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.
Summary
Fixes #1705.
Two bugs in
planemo/test/_check_output.py, both of which silently skip a collection output assertion:for_collections()matched onlyelement_tests. Now also matchesclass: Collection, which is the only gate under which a collection assertion carrying no per-element tests —collection_typeorelement_countalone — is expressible. On master such an output matches nothing, falls through to the file checker, and fails with an unrelated "No path specified for expected output file"._check_output_collection()usedTestCollectionOutputDef.from_dict(), which discards top-levelcollection_type, so the collection type was never asserted. Switched tofrom_yaml_test_format(), which maps it ontoattributes["type"]and resolves theelementsalias.The same predicate gates
planemo/runnable.py:402, so this fixes both call sites.Deliberately not matching a bare
elements:key, though Galaxy's framework-test gate does. It is documented indocs/test_format.rstonly for collection inputs, no IWC workflow uses it for an output, and on its own it does not declare a collection — it stays an alias resolved once the output is known to be one. That leaves bareelements:as the single remaining spelling the two tools disagree on.No dependency bump needed —
from_yaml_test_formathas been ingalaxy-tool-utilsince 25.1, the floor of the current pin.Testing
New
tests/test_check_output.py, 9 pure unit tests, no Galaxy server. 5 fail against current master, including alistassertion against alist:pairedcollection reporting zero problems, and aclass: Collection+element_countoutput that nothing detected at all. All 9 pass after. Black/isort/flake8 clean.🤖 Generated with Claude Code