-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: using an alias in module names #139
Comments
Yes would be really helpful to reduce the amount of code you have to duplicate. Example would be umicollapse in nf-core, where I just had to copy two identical setup() blocks for stub testing and PE testing into the respective tests as otherwise their import names were conflicting with the one from the SE test. |
Agree that aliasing should be implemented asap ✋ |
Thanks @apeltzer for the feedback! What do you think about using an optional nextflow_process {
name "Test process data"
script "./process_data.nf"
process "PROCESS_DATA"
test("Should use process GENERATE_DATA with alias LUKAS to generate input data") {
setup {
run("GENERATE_DATA", alias: "LUKAS") {
script "./generate_data.nf"
process {
"""
input[0] = "nf-core"
"""
}
}
}
when {
process {
"""
input[0] = "Hey "
input[1] = LUKAS.out.results
"""
}
}
then {
assert process.success
assert snapshot(process.out.results).match()
}
}
} I am not sure if the same mechanism makes sense for the process/workflow name it self (see #96). Do you have a usecase in mind where it makes sense to give the test subject a different alias? |
Nf-test (nf-test 0.8.1) doesn't support the aliassing of modules in the
setup
step correctly.To create a test for bbmap/bbsplit I run the same module twice (as was done for the original pytest).
The problem here is that I need to create an alias for the module.
It is correctly importing this but not correctly calling it see the mock.nf for the complete script
Archive.zip
or see the PR nf-core/modules#4131
The text was updated successfully, but these errors were encountered: