UNQ_C1 unittest question

I​t looks like once a sequence has been padded, it’s length is set to max_len, so if it comes up again with a different value for pad, the new value doesn’t get updated.

E​.g., when I print pad, len(q1), then q1 before & after padding, I see:

1 20 
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21] 
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] 
... 
-1 32 
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] 
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

Is there a way to avoid this?

The issue was in how I was doing padding… I was using q1 += .... When I updated to q1 = q1 + ..., the unit tests passed.