Hi, I have a question about adding unit tests for ...
# pipeline-maintainers
l
Hi, I have a question about adding unit tests for a very large python script in the nfcore pipeline. Is there any insturction or an example showing where the unit tests folder should be placed?
m
I usually put the tests in the same repo as the module that uses it
l
Do you mean something like this: viralrecon/
Copy code
├── bin/
│   └── resistance_tables.py
├── tests/
│   ├── unit/
│   │   └── test_resistance_tables.py
│   └── ...
m
I would do either:
Copy code
├── bin/
│   └── resistance_tables.py
├── tests/
│   └── test_resistance_tables.py
│ ...
or
Copy code
├── bin/
│   └── resistance_tables.py
├── modules/local/resistance_tables
│   ├── tests/
│   │   └── test_resistance_tables.py
│   └── ...
l
Aha, I see
Thank you!
m
for me, the first solution if the test is a python test, because that's what you test. The second if you have an nf-test test for it, because then you would test the modules itself
l
Totally agree