test report mig interannual
There should be no message there
> test_that("Test an instance of report_mig_interannual loaded with choice_c",
+ {
+ skip_on_cran()
+ env_set_test_stacomi()
+ stacomi(database_expected = TRUE, sch ="test")
+ r_mig_interannual <- new("report_mig_interannual")
+ # the following will load data for size,
+ # parameters 1786 (total size) C001 (size at video control)
+ # dc 5 and 6 are fishways located on the Arzal dam
+ # two stages are selected
+ suppressWarnings(r_mig_interannual <- choice_c(
+ r_mig_interannual,
+ dc = 6,
+ taxa = c("Anguilla anguilla"),
+ stage = c("AGJ"),
+ start_year = 2010,
+ end_year = 2015,
+ silent = TRUE
+ ))
+ r_mig_interannual <- connect(r_mig_interannual, silent = TRUE)
+ # three warning produced, none shown due to silent=TRUE
+ options(warn = 0)
+ expect_s4_class(r_mig_interannual, "report_mig_interannual")
+ rm(list = ls(envir = envir_stacomi), envir = envir_stacomi)
+
+ })
[1] Running report_mig to correct data for year 2010
[1] There is a difference between report_annual Na= 27371 and report_mig Nj= 27430 but the sums are the same between report_mig and the database (t_bilanmigrationjournalier_bjo). This difference is due to migration report overlapping between two years and the program. No writing in the db.
[1] Running report_mig to correct data for year 2014
[1] There are no values for the taxa, stage and selected period\n
[1] Running report_mig to correct data for year 2015
[1] There are no values for the taxa, stage and selected period\n
Test passed