Lines Matching full:we
21 determined by the invariants it must satisfy, so we can simply test for those
40 # Without this check we will get an index error on the next line when the
45 # Without this check we will miss the case where the insertion point should
46 # be zero: The invariant we maintain in the next section is that lo is
72 # We now know that there is a valid insertion point <= hi and there is no
74 # answer we were seeking
88 # We generate arbitrary lists and turn this into generating sorting lists
92 # We could also do it this way, but that would be a bad idea:
95 # low probability, so we are much better off post-processing values into the
96 # form we want than filtering them out.
101 """We test the first invariant: binary_search should return an index such
110 """We test the second invariant: binary_search should return an index such
120 """In this we test a *consequence* of the second invariant: When we insert
122 times. This is because we know that v is > the previous element and == the