Exemplo n.º 1
0
    def nested_buffer(self):
        b = composition_buffer()
        
        hello = composition_buffer( ("Hallo",) )
        b.append( hello )
        b.hello = hello

        world = composition_buffer( ("Welt",) )
        b.append(world)
        b.world = world

        return b
Exemplo n.º 2
0
    def test_as_string(self):
        b = composition_buffer()
        b.write("Hallo ")
        b.write("Welt!")

        self.assertEqual("Hallo Welt!", b.as_string())
Exemplo n.º 3
0
 def s():
     b = composition_buffer()
     b.close()
     b.write("Hallo")
Exemplo n.º 4
0
 def r():
     b = composition_buffer()
     b.write(x())
Exemplo n.º 5
0
        def r(): buffer = composition_buffer([])

        #self.assertRaises(TypeError, r)

    def test_write(self):