MAINT: update runtests.py script from scipy