ó
_y]c           @   s   d  d l  Z  d  d l Z d  d l m Z d  d l m Z d  d l m Z d d l m	 Z	 e   Z
 e j j e	 d d d	 e  j f d
     Y Z d S(   i˙˙˙˙N(   t   QtGui(   t
   load_qtest(   t   FrontendWidgeti   (   t
   no_displayt   reasons   Doesn't work without a displayt   TestFrontendWidgetc           B   s8   e  Z e d     Z e d    Z d   Z d   Z RS(   c         C   sJ   t  j j   |  _ |  j d k r6 t  j g   |  _ n  |  j j t  d S(   s3    Create the application for the test case.
        N(   R    t   QApplicationt   instancet   _appt   Nonet   setQuitOnLastWindowClosedt   False(   t   cls(    (    sC   lib/python2.7/site-packages/qtconsole/tests/test_frontend_widget.pyt
   setUpClass   s    c         C   s   t  j j   d S(   s    Exit the application.
        N(   R    R   t   quit(   R   (    (    sC   lib/python2.7/site-packages/qtconsole/tests/test_frontend_widget.pyt   tearDownClass   s    c         C   si  t  d d  } | j j } |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d	  d  |  j | d
  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  d S(   s)    Test detecting classic prompts.
        t   kindt   richs   >>> testt   tests	    >>> tests
   	 >>> testt    s   ... tests	    ... tests
     ... tests
   	 ... tests   >>>tests   >> tests   ...tests   .. tests   [remote] >>> tests   [foo] >>> testN(   R   t   _highlightert   transform_classic_promptt   assertEqual(   t   selft   wt   t(    (    sC   lib/python2.7/site-packages/qtconsole/tests/test_frontend_widget.pyt   test_transform_classic_prompt    s"    c         C   sŤ  t  d d  } | j j } |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d	  d	  |  j | d  d  |  j | d
  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  d S(   s)    Test detecting IPython prompts.
        R   R   s   In [1]: testR   s   In [2]: tests   In [10]: tests    In [1]: tests   	 In [1]: testR   s      ...: tests       ...: tests        ...: tests   	   ...: tests   In [1]:tests	   [1]: tests   In: tests   : tests	   ...: tests   [remote] In [1]: tests   [foo] In [1]: testN(   R   R   t   transform_ipy_promptR   (   R   R   R   (    (    sC   lib/python2.7/site-packages/qtconsole/tests/test_frontend_widget.pyt   test_transform_ipy_promptA   s(    (   t   __name__t
   __module__t   classmethodR   R   R   R   (    (    (    sC   lib/python2.7/site-packages/qtconsole/tests/test_frontend_widget.pyR      s   		!(   t   unittestt   pytestt   qtconsole.qtR    t   qtconsole.qt_loadersR   t   qtconsole.frontend_widgetR   R   R   t   QTestt   markt   skipift   TestCaseR   (    (    (    sC   lib/python2.7/site-packages/qtconsole/tests/test_frontend_widget.pyt   <module>   s   	