ó
§]c           @   s`   d  Z  d d l m 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 the svg2pdf preprocessori˙˙˙˙(   t   v4i   (   t   PreprocessorTestsBasei   (   t   SVG2PDFPreprocessori   (   t   onlyif_cmds_existt   Testsvg2pdfc           B   sD   e  Z d  Z d Z d   Z d   Z d   Z e d  d    Z RS(   s&   Contains test functions for svg2pdf.pys˙  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   version="1.0"
   x="0.00000000"
   y="0.00000000"
   width="500.00000"
   height="500.00000"
   id="svg2">
  <defs
     id="defs4" />
  <g
     id="layer1">
    <rect
       width="300.00000"
       height="300.00000"
       x="100.00000"
       y="100.00000"
       style="opacity:1.0000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:8.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.00000000;stroke-opacity:1.0000000"
       id="rect5719" />
  </g>
</svg>c         C   sV   t  j d d d i |  j d 6 g } t  j d d d d d	 |  g } t  j d
 |  S(   sl   Build a reveal slides notebook in memory for use with tests.
        Overrides base in PreprocessorTestsBaset   output_typet   display_datat   datas   image/svg+xmlt   sourcet    t   execution_counti   t   outputst   cells(   t   nbformatt
   new_outputt
   simple_svgt   new_code_cellt   new_notebook(   t   selfR   R   (    (    sI   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_svg2pdf.pyt   build_notebook)   s    !c         C   s   t    } t | _ | S(   s"   Make an instance of a preprocessor(   R   t   Truet   enabled(   R   t   preprocessor(    (    sI   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_svg2pdf.pyt   build_preprocessor6   s    		c         C   s   |  j    d S(   s)   Can a SVG2PDFPreprocessor be constructed?N(   R   (   R   (    (    sI   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_svg2pdf.pyt   test_constructor=   s    t   inkscapec         C   s^   |  j    } |  j   } |  j   } | | |  \ } } |  j d | j d j d j  d S(   s*   Test the output of the SVG2PDFPreprocessors   application/pdfi    N(   R   t   build_resourcesR   t   assertInR   R   R   (   R   t   nbt   resR   (    (    sI   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_svg2pdf.pyt   test_outputB   s
    (	   t   __name__t
   __module__t   __doc__R   R   R   R   R   R   (    (    (    sI   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_svg2pdf.pyR      s   			N(
   R!   R   R    t   baseR   t   svg2pdfR   t   tests.utilsR   R   (    (    (    sI   lib/python2.7/site-packages/nbconvert/preprocessors/tests/test_svg2pdf.pyt   <module>   s
   