Cleanup tests and improve coverage
Created originally on Bitbucket by paugier (Pierre Augier)
I worked to cleanup the tests in fluidsim. It's already much better than few days ago but there are tests that I don't like. In particular, I'd like to suppress
- https://bitbucket.org/fluiddyn/fluidsim/src/default/fluidsim/solvers/test/
- https://bitbucket.org/fluiddyn/fluidsim/src/default/fluidsim/solvers/sw1l/output/test/ (one simulation per output, it is too much, and the structure is too complicated)
For solvers, I think that it is simpler to have one file test_solver.py per solver (similar to https://bitbucket.org/fluiddyn/fluidsim/src/default/fluidsim/solvers/ns2d/test_solver.py) where we test many things.
One class per simulation and we can have as many methods as we want using the simulation object (for example to test output).
I think we have to (re)write the tests for the following solvers (see https://codecov.io/bb/fluiddyn/fluidsim):
- sw1l
- sphere.ns2d
- sphere.sw1l
- ns2d.bouss
- ns2d.strat.diag
- plate2d.diag
@avmo do you think it would be possible and not too complicated to compute SHT in bitbucket and Travis?
fluidsim/base/output is also quite badly tested. We should be able to increase the coverage by using more functions in the test_solver.py files.
Then, we also have to work on fluidsim/util...
My opinion is that code which is not tested could be removed or commented (except if there is a good reason).
I'd like to get this task finish before the next release.