'Rendering the output of a loader, or even the same element, should
return different output each time.'

def test_sameLoaderTwice(self):

    sharedLoader = XMLString('<p    xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"><t:transparent    t:render="classCounter"    />    <t:transparent    t:render="instanceCounter"    /></p>')
    class DestructiveElement(Element, ):
        count = 0
        instanceCount = 0
        loader = sharedLoader
        @renderer
        def classCounter(self, request, tag):
            DestructiveElement.count += 1
            return tag(str(DestructiveElement.count))
        @renderer
        def instanceCounter(self, request, tag):
            self.instanceCount += 1
            return tag(str(self.instanceCount))
    e1 = DestructiveElement()
    e2 = DestructiveElement()
    self.assertFlattensImmediately(e1, '<p>1    1</p>')
    self.assertFlattensImmediately(e1, '<p>2    2</p>')
    self.assertFlattensImmediately(e2, '<p>3    1</p>')
