openearth / aeolis-python

A process-based model for simulating supply-limited aeolian sediment transport
http://aeolis.readthedocs.io/
GNU General Public License v3.0
33 stars 25 forks source link

Regression tests output doesn't show which testcase is being run and for which scenario (1D/2D) #226

Open niketagrawal opened 3 weeks ago

niketagrawal commented 3 weeks ago

Current behavior

The regression tests implemented in aeolis/tests/regression_tests/ checks whether whether running the simulation for the following cases produces the same netCDF file consistently across other code changes in the repository

The testcases include

Currently, the pytest output doesn't show the pass/fail status of testcase for each of the cases making it difficult to understand the test output and debug it in case of a failure.

Desired behavior

Display pass/fail status of each testcase per scenario in the pytest output.

Fix


aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_netCDF_creation[1D_case1_small_waves] PASSED                                         [  5%]
aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_log_file_creation[1D_case1_small_waves] PASSED                                       [ 10%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_shape[1D_case1_small_waves] PASSED                                                    [ 15%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_dimension[1D_case1_small_waves] PASSED                                                [ 20%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[1D_case1_small_waves] FAILED                                                   [ 25%]
aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_netCDF_creation[1D_case2_larger_waves] PASSED                                        [ 30%]
aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_log_file_creation[1D_case2_larger_waves] PASSED                                      [ 35%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_shape[1D_case2_larger_waves] PASSED                                                   [ 40%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_dimension[1D_case2_larger_waves] PASSED                                               [ 45%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[1D_case2_larger_waves] FAILED                                                  [ 50%]
aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_netCDF_creation[1D_case3_erosion_avalanching] ERROR                                  [ 55%]
aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_log_file_creation[1D_case3_erosion_avalanching] ERROR                                [ 60%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_shape[1D_case3_erosion_avalanching] ERROR                                             [ 65%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_dimension[1D_case3_erosion_avalanching] ERROR                                         [ 70%]
aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[1D_case3_erosion_avalanching] ERROR

========================================================================== short test summary info ==========================================================================
FAILED aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[1D_case1_small_waves] - AssertionError: Array values of the parameter 'zs' are expected to remain consistent across simulations for the same model parameter file for 1D case1_small_waves
FAILED aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[1D_case2_larger_waves] - AssertionError: Array values of the parameter 'zs' are expected to remain consistent across simulations for the same model parameter file for 1D case2_larger_waves
FAILED aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[2D_Barchan_dune] - AssertionError: Array values of the parameter 'time' are expected to remain consistent across simulations for the same model parameter file for 2D Barchan_dune
ERROR aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_netCDF_creation[1D_case3_erosion_avalanching] - KeyError: 'Cs'
ERROR aeolis/tests/regression_tests/test_simulation.py::TestOutputFileGeneration::test_log_file_creation[1D_case3_erosion_avalanching] - KeyError: 'Cs'
ERROR aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_shape[1D_case3_erosion_avalanching] - KeyError: 'Cs'
ERROR aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_dimension[1D_case3_erosion_avalanching] - KeyError: 'Cs'
ERROR aeolis/tests/regression_tests/test_simulation.py::TestnetCDFContent::test_array_values[1D_case3_erosion_avalanching] - KeyError: 'Cs'
===================================================== 3 failed, 34 passed, 5004 warnings, 5 errors in 125.60s (0:02:05) =====================================================