The global section was also kept commented in tests/data/dflowfm_build_local.yml.
When uncommenting it, these tests fail:
FAILED tests/test_hydromt.py::test_model_build[piave] - ValueError: Model dflowfm has no method "global"
FAILED tests/test_hydromt.py::test_model_build[local] - ValueError: Model dflowfm has no method "global"
So to resolve this issue, the opt should be passed to mod1.build() without the global section from a yml file. We can pop it in the test and assert whether the global arguments in the yml (crs/network_snap_offset/openwater_computation_node_distance) file correspond to the arguments that were passed via init.
tests/data/dflowfm_build.yml
was aligned withexamples/dflowfm_build.yml
in #178. However, theglobal
section was added but kept commented:The global section was also kept commented in
tests/data/dflowfm_build_local.yml
.When uncommenting it, these tests fail:
In this test, the model is built like this: https://github.com/Deltares/hydromt_delft3dfm/blob/533d58c2119f321c0918a7a3c8897c26a64b068e/tests/test_hydromt.py#L53-L66
So to resolve this issue, the opt should be passed to
mod1.build()
without the global section from a yml file. We can pop it in the test and assert whether the global arguments in the yml (crs/network_snap_offset/openwater_computation_node_distance) file correspond to the arguments that were passed via init.