ó
§‰]c           @   s@   d  Z  d d l m Z d d l m Z d e f d „  ƒ  YZ d S(   s    Tests for the latex preprocessori   (   t   PreprocessorTestsBasei   (   t   LatexPreprocessort	   TestLatexc           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s$   Contains test functions for latex.pyc         C   s   t  ƒ  } t | _ | S(   s"   Make an instance of a preprocessor(   R   t   Truet   enabled(   t   selft   preprocessor(    (    sG   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_latex.pyt   build_preprocessor   s    		c         C   s   |  j  ƒ  d S(   s'   Can a LatexPreprocessor be constructed?N(   R   (   R   (    (    sG   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_latex.pyt   test_constructor   s    c         C   sq   |  j  ƒ  } |  j ƒ  } |  j ƒ  } | | | ƒ \ } } |  j | j d j d ƒ |  j | j d j d ƒ d S(   s(   Test the output of the LatexPreprocessori    s   $ e $i   N(   t   build_notebookt   build_resourcesR   t   assertEqualt   cellst   source(   R   t   nbt   resR   (    (    sG   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_latex.pyt   test_output   s    c         C   s‹   |  j  ƒ  } |  j ƒ  } |  j ƒ  } d | _ | | | ƒ \ } } | d d } d d l m } | d d ƒ j ƒ  } | | k s‡ t ‚ d S(	   s,   Check that highlighting style can be changedt   colorfult   latext   pygments_definitionsiÿÿÿÿ(   t   LatexFormattert   stylet   defaultN(   R	   R
   R   R   t   pygments.formattersR   t   get_style_defst   AssertionError(   R   R   R   R   t
   style_defsR   t   default_defs(    (    sG   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_latex.pyt   test_highlight&   s    	(   t   __name__t
   __module__t   __doc__R   R   R   R   (    (    (    sG   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_latex.pyR   
   s
   			N(   R   t   baseR    R   R   R   (    (    (    sG   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_latex.pyt   <module>   s   