Handle two-case runs better "Handle better" in this case means "don't crash".
1 files changed, 7 insertions(+), 0 deletions(-) M new/tests/suite.py
M new/tests/suite.py => new/tests/suite.py +7 -0
@@ 1539,6 1539,13 @@ def main(args): ) run_times = sorted(run_times) middle = len(run_times) // 2 # If we have only run two cases, we need to handle it with extra care. Otherwise, the # code will crash later when it tries to access index 2 in a two-element list during # median calculation. if middle == 1: middle = 0 print( "median run time was {}".format( colorise(