
]c           @   sQ   d  Z  d d l Z d d l m Z d d d d d	 h Z d
 e f d     YZ d S(   s)   Base TestCase class for testing ExportersiNi   (   t	   TestsBases   text/x-pythons   text/markdowns	   text/htmls   text/restructuredtexts
   text/latext   ExportersTestsBasec           B   s/   e  Z d  Z d Z d Z d d  Z d   Z RS(   s*   Contains base test functions for exporterss   notebook2.ipynbc         C   s   t  j j |  j   |  S(   N(   t   ost   patht   joint   _get_files_path(   t   selft   nb_name(    (    s=   lib/python2.7/site-packages/nbconvert/exporters/tests/base.pyt   _get_notebook   s    c         C   s   |  j  d k r d S|  j   } | j |  j d   \ } } x, |  j  D]! } |  j d | | d |  qG W|  j d |  x5 t j |  j   D]! } |  j d | | d |  q W|  j d |  d S(   s6   test raw cell inclusion based on raw_mimetype metadataNs   rawtest.ipynbs   raw %ss   should include %ss   no raw_mimetype metadatas   should exclude %ss   never be included(	   t   should_include_rawt   Nonet   exporter_classt   from_filenameR   t   assertInt   all_raw_mimetypest
   differencet   assertNotIn(   R   t   exportert   outputt	   resourcest   inct   exc(    (    s=   lib/python2.7/site-packages/nbconvert/exporters/tests/base.pyt   test_raw_cell_inclusion   s    N(   t   __name__t
   __module__t   __doc__R
   R   R	   R   R   (    (    (    s=   lib/python2.7/site-packages/nbconvert/exporters/tests/base.pyR      s
   (   R   R   t
   tests.baseR    R   R   (    (    (    s=   lib/python2.7/site-packages/nbconvert/exporters/tests/base.pyt   <module>   s   	