Found a bug: if you have scripts covered by tests ...
# nf-test
s
Found a bug: if you have scripts covered by tests but those tests match an ignore pattern,
nf-test coverage
will show those scripts as uncovered. The expected behavior is that either: • the ignore patterns are not applied for the coverage command, or • scripts covered by ignored tests are filtered out from the coverage command output Will cut an issue later.
a
Is that a bug or just the expected behaviour? It’s unclear from you comments, but I’d only expect something to be skipped if not only the tests, but also the script itself, matched the
ignore
pattern but even then I think it would be better to have separate
ignore tests
and
ignore scripts
variables, because to me it makes sense that if I have tests that are being ignored/not run, then my code is uncovered?
s
I would argue that if a test is ignored by a pattern, you are making the conscious decision not to cover the associated script with tests in your project. This is the case with nf-core pipelines to suppress testing modules and subworkflows installed from upstream since they would have been tested upstream. So in that case the coverage table should use a third color, maybe yellow or gray, to indicate that the script is not covered because the test is ignored.