JetBrains-Research / span

SPAN Semi-supervised Peak Analyzer
https://doi.org/10.1093/bioinformatics/btab376
MIT License
9 stars 1 forks source link

Don't invoke SpanCLA.main in tests #13

Closed dievsky closed 1 year ago

dievsky commented 5 years ago

We currently test Span CLA by invoking SpanCLA.main and checking its behaviour. This leads to some unique challenges, like avoiding double initialization of configuration paths, or dealing with those times when SpanCLA.main decides to call System.exit(1) (this kills the whole JUnit instance, skipping any further tests). This is because main was explicitly designed to be the entrypoint method and doesn't play nice when it isn't.

As an alternative, we could change the CLA testing to invoke the assembled JAR as a subprocess. Since we only look at stdout/stderr and the files created, this wouldn't reduce our capabilities.