Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone.jl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
4ed36694
Commit
4ed36694
authored
10 months ago
by
Marco Matthies
Browse files
Options
Downloads
Patches
Plain Diff
Re-enable tests that are broken
parent
f3a82bb7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/nature_tests.jl
+12
-16
12 additions, 16 deletions
test/nature_tests.jl
test/test_parameters_almass.toml
+2
-2
2 additions, 2 deletions
test/test_parameters_almass.toml
test/test_parameters_simplecrop.toml
+2
-2
2 additions, 2 deletions
test/test_parameters_simplecrop.toml
with
16 additions
and
20 deletions
test/nature_tests.jl
+
12
−
16
View file @
4ed36694
...
...
@@ -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
This diff is collapsed.
Click to expand it.
test/test_parameters_almass.toml
+
2
−
2
View file @
4ed36694
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
test/test_parameters_simplecrop.toml
+
2
−
2
View file @
4ed36694
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment