be more systematic about use of random numbers within the tests
Kwant's test suite has flaky test failures. I do not believe that these failures are "bad" (i.e. they do not correspond to bugs in kwant) but they are not reproducible. I believe that this is because some of the tests rely on numpy's RNG, and we do not set the seed in a consistent way.
I know for a fact that some of the tests in
kwant.tests.test_qsymm directly use numpy RNG, but even if other tests do not explicitly use it, the numpy RNG is sometimes used inconspicuously (e.g. during sparse diagonalization to choose the initial vector).
My proposal is to simply enable pytest-randomly in CI, so that at least the CI tests are reproducible.
If we also want people to be able to run the tests in a reproducible way on their own computers then we should also make pytest-randomly a testing dependency