tools icon indicating copy to clipboard operation
tools copied to clipboard

Speed up `nf-core modules` pytests

Open ErikDanielsson opened this issue 3 years ago • 2 comments

Description of feature

The pytests for the nf-core modules commands are very slow. I believe this partly due to that every test pulls several remote git repositories in the setUp method. Since all objects that are created by the setUp method are not used by every test, this is unnecessary. We should therefore either move the creation of install objects etc. either to the individual tests or create a test class per modules command with a simpler setUp function. Creating individual classes would also make it easier to test an individual command.

ErikDanielsson avatar Aug 05 '22 10:08 ErikDanielsson

related: #1697

mashehu avatar Aug 05 '22 11:08 mashehu

Refactoring will help, too. e.g. extracting functions from classes as done in https://github.com/nf-core/tools/commit/91199fc7e7ad08b73f6e754f304ba4a88572638f.

fabianegli avatar Aug 08 '22 11:08 fabianegli