test: cover val substring in emit names#4340
Conversation
This PR is against the
|
|
|
||
| output: | ||
| path("*.txt"), emit: results | ||
| val(evaluate_result), emit: evaluation |
There was a problem hiding this comment.
this line should already cover you test case, no?
There was a problem hiding this comment.
Good point, but I don’t think that line fully covers this case because it has a real val(...) output as well:
val(evaluate_result), emit: evaluation
So even if the parser accidentally matched val inside evaluation, the parsed output type would still look correct. The regression I’m trying to cover is a non-val output where only the emit name contains val, e.g. path(...), emit: peak_values, which would expose a false positive if the parser matches keywords inside emit names!
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c32463a to
d4a0b08
Compare
Refs #3483.
This adds a regression test to ensure output parsing treats
valonly as a Nextflow output keyword and does not match it inside emit names such aspeak_values.The current parser already handles this case correctly; this test helps prevent regressions.
Tested with:
python -m pytest tests/modules/lint/test_main_nf.py -k "no_partial_keyword_match_in_emit_name"PR checklist
This comment contains a description of changes (with reason)
CHANGELOG.mdis updatedIf you've fixed a bug or added code that should be tested, add tests!
Documentation in
docsis updated