Skip to content
Snippets Groups Projects
Commit 4ed36694 authored by Marco Matthies's avatar Marco Matthies
Browse files

Re-enable tests that are broken

parent f3a82bb7
No related branches found
No related tags found
No related merge requests found
......@@ -249,28 +249,24 @@ end
end
end
# test migration
# TODO: fix test below
# @test_logs((:info, "Initialised 2 Skylarks."),
# (:debug, "Skylark 1 has migrated."),
# (:debug, "Skylark 2 has migrated."),
# min_level=Logging.Debug, match_mode=:any,
# Ps.initpopulation!("Skylark", Ps.withtestlogger(model)))
# TODO: fix broken test
@test_broken length(model.animals) == 2
@test_logs((:info, "Initialised 2 Skylarks."),
(:debug, "Skylark 1 has migrated."),
(:debug, "Skylark 2 has migrated."),
min_level=Logging.Debug, match_mode=:any,
Ps.initpopulation!("Skylark", Ps.withtestlogger(model)))
@test length(model.animals) == 2
@test all(isnothing, model.animals)
# TODO: fix broken tests
@test_broken length(model.migrants) == 2
@test_broken model.migrants[1].first.sex != model.migrants[2].first.sex
@test length(model.migrants) == 2
@test model.migrants[1].first.sex != model.migrants[2].first.sex
for a in model.migrants
leave, arrive = a.first.migrationdates
@test leave[1] in (9, 10) || (leave[1] == 11 && leave[2] <= 15)
@test (arrive[1] == 2 && arrive[2] >= 15) || (arrive[1] == 3 && arrive[2] <= 15)
end
model.date = Date(year(model.date), 3, 17)
# TODO: fix test below
# @test_logs((:debug, "Skylark 1 has returned."),
# (:debug, "Skylark 2 has returned."),
# min_level=Logging.Debug, match_mode=:any,
# Ps.updatenature!(Ps.withtestlogger(model)))
@test_logs((:debug, "Skylark 1 has returned."),
(:debug, "Skylark 2 has returned."),
min_level=Logging.Debug, match_mode=:any,
Ps.updatenature!(Ps.withtestlogger(model)))
#TODO
end
......@@ -4,7 +4,7 @@
###
#XXX remember that changes here may break tests!
[core]
configfile = "test_parameters.toml" # location of the configuration file
outdir = "results_testsuite" # location and name of the output folder
......@@ -36,7 +36,7 @@ targetspecies = ["Wolpertinger", "Wyvern"] # list of target species to simulate
popoutfreq = "daily" # output frequency population-level data, daily/monthly/yearly/end/never
indoutfreq = "daily" # output frequency individual-level data, daily/monthly/yearly/end/never
insectmodel = ["season", "habitat", "pesticides"] # which factors affect insect growth ("weather" is not yet implemented)
[crop]
cropmodel = "almass" # crop growth model to use, "almass", "aquacrop", or "simple"
cropfile = "crop_data_general.csv" # file with general crop parameters
......
......@@ -4,7 +4,7 @@
###
#XXX remember that changes here may break tests!
[core]
configfile = "test_parameters.toml" # location of the configuration file
outdir = "results_testsuite" # location and name of the output folder
......@@ -36,7 +36,7 @@ targetspecies = ["Wolpertinger", "Wyvern"] # list of target species to simulate
popoutfreq = "daily" # output frequency population-level data, daily/monthly/yearly/end/never
indoutfreq = "daily" # output frequency individual-level data, daily/monthly/yearly/end/never
insectmodel = ["season", "habitat", "pesticides"] # which factors affect insect growth ("weather" is not yet implemented)
[crop]
cropmodel = "simple" # crop growth model to use, "almass", "aquacrop", or "simple"
cropfile = "crop_data_general.csv" # file with general crop parameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment