def test_insertImages(self):
        parent = Element('div')
        base = FilePath(self.mktemp())
        base.makedirs()

        macros = Element('span')
        macros.setAttribute('class', 'latexmacros')
        text = Text()
        text.data = 'foo'
        macros.appendChild(text)
        parent.appendChild(macros)

        formula = Element('span')
        formula.setAttribute('class', 'latexformula')
        text = Text()
        text.data = 'bar'
        formula.appendChild(text)
        parent.appendChild(formula)

        # Avoid actually executing the commands to generate images from the
        # latex.  It might be nice to have some assertions about what commands
        # are executed, or perhaps even execute them and make sure an image
        # file is created, but that is a task for another day.
        commands = []
        formulaeToImages(parent, base.path, _system=commands.append)

        self.assertEqual(
            parent.toxml(),
            '<div><span><br/><img src="latexformula0.png"/><br/></span></div>')
Clears the collection.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/lore/test/test_lmath.py/FormulaeTests.test_insertImages--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/PyAMF-0.6.1/pyamf/codec.py/IndexedCollection.clear