Tests are too slow
Executing all tests takes >40 s on my computer. This is very long and makes executing tests quickly cumbersome. It should be possible to speed up the tests significantly, say by a factor of 2.
The following plot was generated with the command
pytest-3 --durations=1000 | sed -ne '/^[0-9]*\.[0-9]*s call/ s/s call.*//p' | tac | gnuplot -e 'set xrange [200:]; plot "<cat" w linesp; pause mouse'
. It shows the duration of individual tests. It is quite clearly visible (kink) that the 15 or so slowest tests take unusually long.
These are the following tests:
3.75s call kwant/solvers/tests/test_mumps.py::test_many_leads
2.57s call kwant/tests/test_plotter.py::test_plot
2.46s call kwant/tests/test_plotter.py::test_current
2.11s call kwant/tests/test_plotter.py::test_spectrum
1.87s call kwant/tests/test_rmt.py::test_gaussian_distributions
1.78s call kwant/tests/test_wraparound.py::test_value_types
1.68s call kwant/tests/test_wraparound.py::test_plot_2d_bands
1.63s call kwant/tests/test_kpm.py::test_check_convergence_decreasing_values
1.62s call kwant/tests/test_plotter.py::test_current_interpolation
1.43s call kwant/solvers/tests/test_mumps.py::test_wavefunc_ldos_consistency
1.23s call kwant/tests/test_kpm.py::test_convergence_custom_vector_factory
1.09s call kwant/solvers/tests/test_mumps.py::test_two_equal_leads
1.03s call kwant/continuum/tests/test_discretizer.py::test_numeric_functions_advance
0.85s call kwant/physics/tests/test_leads.py::test_modes_symmetries
0.74s call kwant/solvers/tests/test_mumps.py::test_selfenergy
0.67s call kwant/solvers/tests/test_sparse.py::test_many_leads
I guess that it should be possible to limit even long-running tests to 0.5 s, or 1 s in exceptional cases.