def test_flat_prepend(self): l = FlatList([1]) l.flat_prepend([2]) assert l == [2, 1] assert l.flat_prepend(3) == [3, 2, 1]
def test_flatten(self): l = FlatList([1, [2, [3]]]) assert l.flatten() == [1, 2, 3] assert l == [1, 2, 3]
def test_flat_append(self): l = FlatList([1]) l.flat_append([2]) assert l == [1, 2] assert l.flat_append(3) == [1, 2, 3]
def test_prepend(self): l = FlatList([1]) l.prepend(2) assert l == [2, 1]