Commit 08f93b37 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

test(RunModel_Lag): remove useless test on the QupstrUnit argument of the...

test(RunModel_Lag): remove useless test on the QupstrUnit argument of the CreateInputsModel function
- now use match.arg
Refs 7cbab175
parent b56a2b34
Pipeline #22712 passed with stages
in 9 minutes
...@@ -39,22 +39,6 @@ RunOptions <- suppressWarnings(CreateRunOptions(FUN_MOD = RunModel_GR4J, ...@@ -39,22 +39,6 @@ RunOptions <- suppressWarnings(CreateRunOptions(FUN_MOD = RunModel_GR4J,
InputsModel = InputsModel, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run)) IndPeriod_Run = Ind_Run))
test_that("'QupstrUnit' must correspond to one possible value", {
expect_error(
InputsModel <- CreateInputsModel(
FUN_MOD = RunModel_GR4J,
DatesR = BasinObs$DatesR,
Precip = BasinObs$P,
PotEvap = BasinObs$E,
Qupstream = matrix(Qupstream, ncol = 1),
LengthHydro = 1,
BasinAreas = BasinAreas,
QupstrUnit = "m3/h"
),
regexp = "'arg' should be one of \"mm\", \"m3\", \"m3/s\", \"l/s\""
)
})
test_that("QcontribDown parameter should be a numeric vector or an OutputModel object", { test_that("QcontribDown parameter should be a numeric vector or an OutputModel object", {
regexp = "'QcontribDown' must be a numeric vector or a 'OutputsModel' object" regexp = "'QcontribDown' must be a numeric vector or a 'OutputsModel' object"
expect_error( expect_error(
......
  • I'm not sure that that test should be remove.

    It shall still have a test describing the error that should have the user if he enters a wrong unit.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment