Skip to content
Snippets Groups Projects
Commit a20f637f authored by Bentriou Mahmoud's avatar Bentriou Mahmoud
Browse files

Test reorganization : grouping tests by type (unit, sim) + script that

run the tests
Function load_module in core + test
parent c5f43847
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import Base: +, -, getfield, getindex
export Model, ContinuousTimeModel, DiscreteTimeModel
export simulate, set_param!, get_param
export load_model
include("model.jl")
export Observations, AbstractTrajectory
......
......@@ -8,3 +8,7 @@ function simulate(m::Model, n::Int; bound::Real = Inf)::AbstractObservations end
function set_param!(m::Model, p::AbstractVector{Real})::Nothing end
function get_param(m::Model)::AbstractVector{Real} end
function load_model(name_model::String)
include(pathof(@__MODULE__) * "/../../models/" * name_model * ".jl")
end
......@@ -48,5 +48,5 @@ g = SVector(1)
# Gamma should be constructed automatically in the case of
#m = Model(d,dobs,k,dict,l_name,param,p,x0,f,g)
#SIR = Model(d,dobs,k,dict,l_name,param,p,x0,f,g)
using Test
@testset "Unit tests" begin
@test include("unit/load_model.jl")
@test include("unit/load_module.jl")
end
......@@ -2,7 +2,7 @@
using MarkovProcesses
using PyPlot
include("models/sir.jl")
load_model("sir")
σ = simulate(SIR)
plt.figure()
......
using MarkovProcesses
load_model("sir")
return true
using MarkovProcesses
return true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment