diff --git a/tests/testthat/test-vivax.R b/tests/testthat/test-vivax.R index e5aa5670..af866893 100644 --- a/tests/testthat/test-vivax.R +++ b/tests/testthat/test-vivax.R @@ -46,43 +46,6 @@ test_that('Test difference between falciparum and vivax parameter lists', { ) }) -test_that('Test age structure should not change vivax infectivity', { - falc_parameters <- get_parameters( - overrides = list( - human_population = 1, - init_id = 0.5)) - - vivax_parameters <- get_parameters( - parasite = "vivax", - overrides = list( - human_population = 1)) - - state_mock <- mockery::mock('A', cycle = T) - mockery::stub(create_variables, 'initial_state', state_mock) - state_vivax_mock <- mockery::mock(list(human_states = 'A', - hypnozoites_v = 0), cycle = T) - mockery::stub(create_variables, 'initial_state_vivax', state_vivax_mock) - - ages_mock <- mockery::mock(365, cycle = T) - mockery::stub(create_variables, 'calculate_initial_ages', ages_mock) - - falc_variables <- create_variables(falc_parameters) - vivax_variables <- create_variables(vivax_parameters) - - expect_equal(falc_variables$infectivity$get_values(), 0.06761596) - expect_equal(vivax_variables$infectivity$get_values(), 0.1) - - ages_mock <- mockery::mock(365*70, cycle = T) - mockery::stub(create_variables, 'calculate_initial_ages', ages_mock) - - falc_variables <- create_variables(falc_parameters) - vivax_variables <- create_variables(vivax_parameters) - - expect_equal(falc_variables$infectivity$get_values(), 0.03785879) - expect_equal(vivax_variables$infectivity$get_values(), 0.1) - -}) - ## Test anti-parasite immunity subpatent progression functions test_that('Test anti-parasite immunity function', { vivax_parameters <- get_parameters(parasite = "vivax",