Skip to content

Commit

Permalink
edit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis-Titov committed Feb 24, 2024
1 parent 3c452f7 commit 1f84061
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ using Test
using SafeTestsets

@time begin
@time @safetestset "MWC Rate Eq Derivation" begin
@safetestset "MWC Rate Eq Derivation" begin
include("tests_for_rate_eq_derivation.jl")
end
@time @safetestset "MWC Rate Eq Fitting" begin
@safetestset "MWC Rate Eq Fitting" begin
include("tests_for_rate_eq_fitting.jl")
end
@time @safetestset "MWC Rate Eq Subset Selection" begin
@safetestset "MWC Rate Eq Subset Selection" begin
include("tests_for_rate_eq_subset_selection.jl")
end
end
4 changes: 3 additions & 1 deletion test/tests_for_rate_eq_fitting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ benchmark_result = @benchmark EnzymeFitting.loss_rate_equation(kinetic_params, r
benchmark_result = @benchmark EnzymeFitting.loss_rate_equation($(kinetic_params), rate_equation, $(rate_data_nt), $(param_names), $(fig_point_indexes))
@test mean(benchmark_result.times) <= 100_000 #ns

fit_result = @time fit_rate_equation(rate_equation, data, metab_names, param_names; n_iter=20)
#TODO: make fake data with noise and known params and ensure known params are recovered
fit_result = fit_rate_equation(rate_equation, data, metab_names, param_names; n_iter=20)
@test isapprox(fit_result.loss, 0.08946088323758938, rtol=1e-3)
@test fit_result.params isa NamedTuple{param_names}{NTuple{length(param_names), Float64}}

0 comments on commit 1f84061

Please sign in to comment.