From 2e368d9f79104b8ed6a03939e6a628d524a2556c Mon Sep 17 00:00:00 2001 From: Samuel Brand Date: Mon, 4 Nov 2024 10:56:07 +0000 Subject: [PATCH] rm old unit test --- EpiAware/test/EpiInfModels/ODEProcess.jl | 35 ------------------------ 1 file changed, 35 deletions(-) diff --git a/EpiAware/test/EpiInfModels/ODEProcess.jl b/EpiAware/test/EpiInfModels/ODEProcess.jl index 8ec942161..44238db79 100644 --- a/EpiAware/test/EpiInfModels/ODEProcess.jl +++ b/EpiAware/test/EpiInfModels/ODEProcess.jl @@ -29,38 +29,3 @@ @test eltype(params_mixed.u0) == Float64 @test eltype(params_mixed.p) == Float64 end - -@testitem "ODEProcess + generate_latent_infs Tests" begin - using OrdinaryDiffEq - - function simple_ode!(du, u, p, t) - du[1] = p[1] * u[1] - end - - u0 = [1.0] - p = [-0.5] - params = ODEParams(u0 = u0, p = p) - tspan = (0.0, 10.0) - prob = ODEProblem(simple_ode!, u0, tspan, p) - - # Define a simple solver and function for testing - solver = Tsit5() - sol2infs = sol -> sol[1, :] - - # Create an instance of ODEProcess for testing - infectionmodel = ODEProcess(; prob, ts = [0.0, 1.0, 2.0], solver, sol2infs) - - @testset "ODEProcess constructor" begin - @test infectionmodel isa ODEProcess - @test infectionmodel.prob == prob - @test infectionmodel.ts == [0.0, 1.0, 2.0] - @test infectionmodel.solver == solver - @test infectionmodel.sol2infs == sol2infs - end - - @testset "infection generation accuracy" begin - actual_infs = map(t -> exp(params.p[1] * t), infectionmodel.ts) - generated_infs = generate_latent_infs(infectionmodel, params)() - @test generated_infs≈actual_infs atol=1e-6 - end -end