Insertion Sort Algorithm in Python
One thing that can speed up insertion sort is to pull the partition value to the side and slide elements up into the vacancy until the correct location is found, then drop the partition value into that location.  This eliminates one of the three assignments in the while loop:

for p in range(1, len(seq)):
    if seq[p] &gt;= seq[p-1]:
        continue
    p_value = seq[p]
    while p != 0 and p_value &lt; seq[p-1]:
        seq[p] = seq[p-1]
        p -= 1
    seq[p] = p_value
return seq


The unit test shows a substantial speed improvement from doing this.