Skip to content

Commit

Permalink
Removing redundant age-structured infectivity test during rebasing.
Browse files Browse the repository at this point in the history
Merge branch 'vivax_competing_hazards_main_subpatent_duration_disease_progression' of github.com:mrc-ide/malariasimulation into vivax_competing_hazards_main_subpatent_duration_disease_progression

# Conflicts:
#	R/variables.R
#	data-raw/parasite_parameters.csv
#	tests/testthat/test-vivax.R
  • Loading branch information
RJSheppard committed Jul 30, 2024
2 parents 3d6909c + 121fa4f commit 4d1fb9a
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions tests/testthat/test-vivax.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4d1fb9a

Please sign in to comment.