Tests are running slow
A handful of tests run analyses on very long trajectories, which makes a full test run take a lot of time.
Since those tests don't need this much statistic, we should rewrite them to run faster. This will also speed up the CI.
From slowest to fastest:
7.11s call tests/modules/test_structure.py::TestSaxs::test_saxs
6.95s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_xy_vac
5.65s call tests/modules/test_structure.py::TestSaxs::test_nobindata
5.38s call tests/test_utils.py::test_corr2[vector10-None-True-2.0]
5.18s call tests/test_utils.py::test_corr2[vector11-None-False-6.0]
3.45s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_sym_ofile
3.41s call tests/modules/test_base.py::TestProfilePlanarBase::test_multigroup
3.40s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_sym
3.23s call tests/modules/test_epsilon.py::TestEpsilonCylinder::test_repaired_molecules
3.22s call tests/modules/test_epsilon.py::TestEpsilonCylinder::test_length
3.20s call tests/modules/test_epsilon.py::TestEpsilonCylinder::test_variable_binwidth
3.17s call tests/modules/test_epsilon.py::TestEpsilonCylinder::test_singleline
3.07s call tests/modules/test_epsilon.py::TestDielectricSpectrum::test_output
3.07s call tests/modules/test_timeseries.py::TestDipoleAngle::test_DipoleAngle
3.06s call tests/modules/test_epsilon.py::TestDielectricSpectrum::test_output_name_prefix
3.06s call tests/modules/test_epsilon.py::TestDielectricSpectrum::test_output_name_binned
3.06s call tests/modules/test_epsilon.py::TestDielectricSpectrum::test_output_name
2.97s call tests/modules/test_epsilon.py::TestDielectricSpectrum::test_binning
2.92s call tests/modules/test_base.py::TestProfilePlanarBase::test_sym
2.29s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_multiple_dipole_orientations[orientation2-M_par2-0]
2.22s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_multiple_dipole_orientations[orientation3-M_par3-0.5773502691896258]
2.19s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_multiple_dipole_orientations[orientation0-M_par0-1]
2.18s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_multiple_dipole_orientations[orientation1-M_par1-0]
2.18s call tests/modules/test_base.py::TestProfilePlanarBase::test_f_kwargs
2.14s call tests/modules/test_structure.py::TestDiporder::test_output
2.11s call tests/modules/test_structure.py::TestDiporder::test_verbose
2.11s call tests/modules/test_structure.py::TestDiporder::test_Diporder_slab[1]
2.10s call tests/modules/test_base.py::TestProfilePlanarBase::test_profile[number]
2.10s call tests/modules/test_structure.py::TestDiporder::test_Diporder_slab[2]
2.10s call tests/modules/test_structure.py::TestDiporder::test_output_name
2.09s call tests/modules/test_structure.py::TestDiporder::test_repaired_molecules
2.08s call tests/modules/test_structure.py::TestDiporder::test_L_cum
2.07s call tests/modules/test_structure.py::TestDiporder::test_Diporder_slab[0]
1.62s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_single_dipole_orientations[orientation1-M_par1-0]
1.58s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_single_dipole_orientations[orientation2-M_par2-0]
1.58s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_single_dipole_orientations[orientation0-M_par0-1]
1.58s call tests/modules/test_epsilon.py::TestEpsilonPlanar::test_single_dipole_orientations[orientation3-M_par3-0.5773502691896258]
1.49s call tests/modules/test_base.py::TestProfilePlanarBase::test_profile[volume]
1.47s call tests/modules/test_structure.py::TestSaxs::test_one_frame
1.44s call tests/modules/test_base.py::TestProfilePlanarBase::test_profile[None]
0.71s setup tests/modules/test_density.py::TestDensityPlanar::test_multiple[mass-mean0]
0.70s setup tests/modules/test_density.py::TestDensityPlanar::test_multiple[charge-mean2]
0.68s setup tests/modules/test_density.py::TestTemperaturProfile::test_multiple
0.66s call tests/test_main.py::Test_parse_args::test_available_modules[TemperaturePlanar]
0.66s call tests/test_main.py::Test_parse_args::test_extra_options[help]
0.65s call tests/test_main.py::Test_parse_args::test_available_modules[KineticEnergy]
0.65s call tests/test_main.py::Test_parse_args::test_available_modules[DensityPlanar]
0.65s setup tests/modules/test_density.py::TestDensityPlanar::test_multiple[number-mean1]
0.63s call tests/test_main.py::Test_parse_args::test_available_modules[EpsilonPlanar]
0.63s call tests/test_main.py::Test_parse_args::test_available_modules[DielectricSpectrum]
0.63s call tests/test_main.py::Test_parse_args::test_available_modules[ChemicalPotentialPlanar]
0.62s call tests/test_main.py::Test_parse_args::test_available_modules[EpsilonCylinder]
0.62s call tests/test_main.py::Test_parse_args::test_extra_options[version]
0.62s call tests/test_main.py::Test_parse_args::test_available_modules[Velocity]
0.62s call tests/test_main.py::Test_parse_args::test_available_modules[Saxs]
0.62s call tests/test_main.py::Test_parse_args::test_available_modules[DensityCylinder]
0.61s call tests/test_main.py::Test_parse_args::test_available_modules[RDFPlanar]
0.61s call tests/test_main.py::Test_parse_args::test_wrong_module
0.61s call tests/test_0_custom_modules.py::TestAnalysisExample::test_cli
0.60s call tests/test_main.py::Test_parse_args::test_required_args
0.60s call tests/test_main.py::Test_parse_args::test_available_modules[Diporder]
0.60s call tests/test_main.py::Test_parse_args::test_available_modules[AnalysisExample]
0.59s call tests/test_main.py::Test_parse_args::test_available_modules[DipoleAngle]
0.56s call tests/modules/test_structure.py::TestSaxs::test_theta
0.38s call tests/test_utils.py::test_correlation_time[vector1-Sokal-8-3-4.5]
0.37s call tests/test_utils.py::test_correlation_time[vector2-Chodera-8-3-1.9999999999999998]
0.35s call tests/test_utils.py::test_correlation_time[vector3-Chodera-8-3-4.5]
0.35s call tests/test_utils.py::test_correlation_time[vector0-Sokal-8-3-1.9999999999999998]
0.26s call tests/modules/test_structure.py::TestDiporder::test_broken_molecules
0.26s setup tests/modules/test_density.py::TestDensityPlanar::test_comshift_over_boundaries
0.20s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_masses
0.20s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_multiple_ags
0.18s setup tests/modules/test_density.py::TestDensityPlanar::test_comshift
0.17s call tests/modules/test_epsilon.py::TestEpsilonCylinder::test_broken_molecules
0.15s setup tests/modules/test_structure.py::TestRDFPlanar::test_wrong_binmethod
0.15s setup tests/modules/test_structure.py::TestRDFPlanar::test_different_axis
0.15s setup tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_multiple_ags
0.14s call tests/modules/test_density.py::TestDensityPlanar::test_comshift
0.14s call tests/modules/test_density.py::TestDensityPlanar::test_comshift_z2
0.14s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_mult_res_mult_atoms_ag
0.14s setup tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_two_residues
0.14s setup tests/modules/test_density.py::TestDensityPlanar::test_comshift_z2
0.14s setup tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_mult_res_mult_atoms_ag
0.14s setup tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_masses
0.13s call tests/modules/test_density.py::TestDensityPlanar::test_comshift_over_boundaries
0.13s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_temp
0.12s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_error
0.12s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu
0.12s call tests/modules/test_density.py::TestTemperaturProfile::test_multiple
0.11s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_zpos
0.11s call tests/modules/test_density.py::TestChemicalPotentialPlanar::test_mu_mass
0.11s call tests/modules/test_density.py::TestTemperaturProfile::test_dens[2]
0.11s call tests/modules/test_density.py::TestTemperaturProfile::test_dens[1]
0.11s call tests/modules/test_density.py::TestTemperaturProfile::test_dens[0]
[everything under 0.10s omitted]
Edited by Henrik Stooss