Commit 383d97e9 authored by Dorchies David's avatar Dorchies David
Browse files

feat(tests): Add generic ignored variable in .regressionignore

parent d585f712
# .test-regression.ignore contains the list of topic/variables produces by
# documentation examples that should be ignore in the regression test
# The format of this file is: 5 lines of comments followed by one line by
# ignored variable : [Topic]<SPACE>[Variable].
# ignored variable : [Topic]<SPACE>[Variable] or *<SPACE>[Variable] for every variable whatever the topic
# Example for ignoring OutputsModel variable produced by example("RunModel_GR2M"): RunModel_GR2M OutputsModel
Calibration_Michel RunOptions
Calibration RunOptions
CreateCalibOptions RunOptions
CreateIniStates RunOptions
CreateInputsCrit RunOptions
CreateInputsModel RunOptions
CreateRunOptions RunOptions
ErrorCrit_KGE RunOptions
ErrorCrit_KGE2 RunOptions
ErrorCrit_NSE RunOptions
ErrorCrit_RMSE RunOptions
ErrorCrit RunOptions
Imax RunOptions
* RunOptions
Param_Sets_GR4J RunOptions_Cal
Param_Sets_GR4J RunOptions_Val
RunModel_CemaNeige RunOptions
RunModel_CemaNeigeGR4J RunOptions
RunModel_CemaNeigeGR5J RunOptions
RunModel_CemaNeigeGR6J RunOptions
RunModel_GR1A RunOptions
RunModel_GR2M RunOptions
RunModel_GR4H RunOptions
RunModel_GR4J RunOptions
RunModel_GR5H RunOptions
RunModel_GR5J RunOptions
RunModel_GR6J RunOptions
RunModel_Lag RunOptions
RunModel RunOptions
SeriesAggreg RunOptions
Calibration OutputsModel
Calibration_Michel OutputsModel
CreateCalibOptions OutputsModel
CreateIniStates OutputsModel
CreateInputsCrit OutputsModel
CreateInputsModel OutputsModel
CreateRunOptions OutputsModel
ErrorCrit OutputsModel
ErrorCrit_KGE OutputsModel
ErrorCrit_KGE2 OutputsModel
ErrorCrit_NSE OutputsModel
ErrorCrit_RMSE OutputsModel
Imax OutputsModel
RunModel OutputsModel
RunModel_CemaNeige OutputsModel
RunModel_CemaNeigeGR4J OutputsModel
RunModel_CemaNeigeGR5J OutputsModel
RunModel_CemaNeigeGR6J OutputsModel
RunModel_GR1A OutputsModel
RunModel_GR2M OutputsModel
RunModel_GR4H OutputsModel
RunModel_GR4J OutputsModel
RunModel_GR5H OutputsModel
RunModel_GR5J OutputsModel
RunModel_GR6J OutputsModel
RunModel_Lag OutputsModel
SeriesAggreg OutputsModel
* OutputsModel
Param_Sets_GR4J OutputsModel_Val
RunModel_Lag OutputsModelDown
SeriesAggreg SimulatedMonthlyRegime
context("Compare example outputs with CRAN")
CompareWithStable <- function(refVarFile, testDir, regIgnore) {
v <- data.frame(topic = basename(dirname(refVarFile)),
v <- list(topic = basename(dirname(refVarFile)),
var = gsub("\\.rds$", "", basename(refVarFile)))
if (is.null(regIgnore) || all(apply(regIgnore, 1, function(x) !all(x == v)))) {
if (is.null(regIgnore) || !any(apply(regIgnore, 1, function(x) {v$var == x[2] && (x[1] == "*" || x[1] == v$topic)}))) {
test_that(paste("Compare", v$topic, v$var), {
testVarFile <- paste0(
file.path(testDir, v$topic, v$var),
......
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