def test_quick(): import random for i in range(0, 10000): tcount = i % 100 fcount = 100 - tcount tset = [True] * tcount + [False] * fcount random.shuffle(tset) s1 = Stack(tset) s2 = Stack(tset) assert s1.solve_regular() == s2.solve_quick()