ó
[³XMc           @   sP   d  Z  d d l m Z d d l m Z d d l m Z d e f d „  ƒ  YZ d S(   s'   
Tests for L{twisted.python.htmlizer}.
iÿÿÿÿ(   t   StringIO(   t   TestCase(   t   filtert   FilterTestsc           B   s    e  Z d  Z d „  Z d „  Z RS(   s6   
    Tests for L{twisted.python.htmlizer.filter}.
    c         C   s<   t  d ƒ } t  ƒ  } t | | ƒ |  j | j ƒ  d ƒ d S(   sˆ   
        If passed an empty input file, L{filter} writes a I{pre} tag containing
        only an end marker to the output file.
        t    s2   <pre><span class="py-src-endmarker"></span></pre>
N(   R    R   t   assertEqualt   getvalue(   t   selft   inputt   output(    (    sE   /usr/lib/python2.7/dist-packages/twisted/python/test/test_htmlizer.pyt
   test_empty   s    	c         C   s<   t  d ƒ } t  ƒ  } t | | ƒ |  j | j ƒ  d ƒ d S(   s³   
        If passed an input file containing a variable access, L{filter} writes
        a I{pre} tag containing a I{py-src-variable} span containing the
        variable.
        s   foo
s   <pre><span class="py-src-variable">foo</span><span class="py-src-newline">
</span><span class="py-src-endmarker"></span></pre>
N(   R    R   R   R   (   R   R   R	   (    (    sE   /usr/lib/python2.7/dist-packages/twisted/python/test/test_htmlizer.pyt   test_variable   s    		(   t   __name__t
   __module__t   __doc__R
   R   (    (    (    sE   /usr/lib/python2.7/dist-packages/twisted/python/test/test_htmlizer.pyR      s   	N(   R   R    t   twisted.trial.unittestR   t   twisted.python.htmlizerR   R   (    (    (    sE   /usr/lib/python2.7/dist-packages/twisted/python/test/test_htmlizer.pyt   <module>   s   