Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark new slow running tests #1145

Closed
matt-graham opened this issue Sep 28, 2023 · 0 comments · Fixed by #1164
Closed

Mark new slow running tests #1145

matt-graham opened this issue Sep 28, 2023 · 0 comments · Fixed by #1164

Comments

@matt-graham
Copy link
Collaborator

Quite a few slower running tests are now running when --skip-slow option is passed to pytest which was added in #442:

Tests taking more than 10s to run when running with --skip-slow
804.16s call     tests/test_epilepsy.py::test_epilepsy_treatment[83563095832589325021]
254.75s call     tests/test_contraception.py::test_contraception_coverage_with_use_healthsystem[83563095832589325021]
209.24s call     tests/test_epi.py::test_facility_level_distribution[83563095832589325021]
185.45s call     tests/test_tb.py::test_basic_run[83563095832589325021]
152.46s call     tests/test_contraception.py::test_correct_number_of_live_births_created[83563095832589325021]
143.95s call     tests/test_healthsystem.py::test_manipulation_of_service_availability[83563095832589325021]
139.07s call     tests/test_hiv.py::test_use_dummy_version[83563095832589325021]
93.72s call     tests/test_demography.py::test_ageing_of_old_people_up_to_max_age[83563095832589325021]
83.37s call     tests/test_healthsystem.py::test_service_availability_can_be_set_using_list_of_treatment_ids_and_asterisk[83563095832589325021]
58.28s call     tests/test_healthsystem.py::test_determinism_of_hsi_that_run_and_consumables_availabilities[83563095832589325021]
50.55s call     tests/test_contraception.py::test_record_of_appt_footprint_for_switching_to_methods[83563095832589325021]
45.25s call     tests/test_contraception.py::test_initial_distribution_of_contraception[83563095832589325021]
37.82s call     tests/test_maternal_health_helper_and_analysis_functions.py::test_analysis_events_force_availability_of_consumables_when_scheduled_in_anc[83563095832589325021]
35.74s call     tests/test_control_order_of_events.py::test_control_of_ordering_in_full_model[83563095832589325021]
31.98s call     tests/test_maternal_health_helper_and_analysis_functions.py::test_analysis_analysis_events_run_as_expected_and_update_parameters[83563095832589325021]
31.19s call     tests/test_maternal_health_helper_and_analysis_functions.py::test_analysis_events_force_availability_of_consumables_for_sba_analysis[83563095832589325021]
30.90s call     tests/test_maternal_health_helper_and_analysis_functions.py::test_analysis_events_force_availability_of_consumables_for_newborn_hsi[83563095832589325021]
29.25s call     tests/test_maternal_health_helper_and_analysis_functions.py::test_analysis_events_force_availability_of_consumables_for_pnc_analysis[83563095832589325021]
27.70s call     tests/test_prostate_cancer.py::test_check_progression_through_stages_is_blocked_by_treatment[83563095832589325021]
26.41s call     tests/test_maternal_health_helper_and_analysis_functions.py::test_analysis_events_circumnavigates_sf_and_competency_parameters[83563095832589325021]
25.18s call     tests/test_copd.py::test_death_rate
24.25s call     tests/test_tb.py::test_record_of_appt_of_tb_start_treatment_hsi[83563095832589325021]
23.36s call     tests/test_healthsystem.py::test_all_treatment_ids_defined_in_priority_policies[83563095832589325021]
21.32s call     tests/test_healthburden.py::test_get_mappers_in_fullmodel
19.86s call     tests/test_other_adult_cancers.py::test_check_progression_through_stages_is_blocked_by_treatment[83563095832589325021]
19.69s call     tests/test_analysis.py::test_get_treatment_ids
19.17s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Contraception]
17.30s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-CareOfWomenDuringPregnancy]
16.52s call     tests/test_pregnancy_supervisor.py::test_abortion_complications[83563095832589325021]
16.46s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Hiv]
15.90s call     tests/test_healthcareseeking.py::test_care_seeking_from_symptoms_with_different_levels_of_prob_emergency[83563095832589325021]
15.31s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Depression]
15.15s call     tests/test_stunting.py::test_math_of_incidence_calcs[83563095832589325021]
15.11s call     tests/test_pregnancy_supervisor.py::test_induction_of_labour_logic[83563095832589325021]
15.04s call     tests/test_demography.py::test_max_age_initial[83563095832589325021]
14.72s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Malaria]
14.28s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Stunting]
14.27s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-PregnancySupervisor]
14.20s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-CardioMetabolicDisorders]
14.05s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Diarrhoea]
14.04s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Labour]
13.41s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-NewbornOutcomes]
13.39s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Alri]
13.37s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Deviance]
13.07s call     tests/test_module_dependencies.py::test_module_dependencies_all_required[83563095832589325021-PregnancySupervisor, CareOfWomenDuringPregnancy]
13.05s call     tests/test_healthcareseeking.py::test_non_emergency_first_appt_can_be_levels_0_1a_1b_2[83563095832589325021]
12.94s call     tests/test_analysis.py::test_colormap_cause_of_death_label[83563095832589325021]
12.69s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-PostnatalSupervisor]
12.66s call     tests/test_pregnancy_supervisor.py::test_pregnancy_supervisor_chorio_and_prom[83563095832589325021]
12.35s call     tests/test_analysis.py::test_scenario_switcher[83563095832589325021]
12.34s call     tests/test_pregnancy_supervisor.py::test_pregnancy_supervisor_placental_conditions_and_antepartum_haemorrhage[83563095832589325021]
12.26s call     tests/test_module_dependencies.py::test_module_dependencies_allow_initialisation[83563095832589325021-Tb]
11.81s call     tests/test_module_dependencies.py::test_module_dependencies_all_required[83563095832589325021-PregnancySupervisor, Labour]
10.66s call     tests/test_pregnancy_supervisor.py::test_pregnancy_supervisor_pre_eclampsia_and_progression[83563095832589325021]
10.54s call     tests/test_demography.py::test_run_dtypes_and_mothers_female[83563095832589325021]
10.44s call     tests/test_enhanced_lifestyle.py::test_properties_and_dtypes[83563095832589325021]
10.05s call     tests/test_antenatal_interventions.py::test_perfect_run_of_anc_contacts_no_constraints[83563095832589325021]

We should add slow marks to these tests.

We could also potentially somewhat automate this process by adding a scheduled job which runs tests not marked with slow weekly, collects durations and reports any which are over 10s in duration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

1 participant