def test_append_and_extend(self):
     items = ItemList(int)
     items.append(1)
     items.append(2)
     items.extend((3, 4))
     assert_equal(list(items), [1, 2, 3, 4])
Exemplo n.º 2
0
 def test_append_and_extend(self):
     items = ItemList(int)
     items.append(1)
     items.append(2)
     items.extend((3, 4))
     assert_equal(list(items), [1, 2, 3, 4])
Exemplo n.º 3
0
 def test_extend_with_generator(self):
     items = ItemList(str)
     items.extend((c for c in 'Hello, world!'))
     assert_equal(list(items), list('Hello, world!'))
Exemplo n.º 4
0
 def test_extend_with_generator(self):
     items = ItemList(str)
     items.extend((c for c in 'Hello, world!'))
     assert_equal(list(items), list('Hello, world!'))