
,]c           @   s~   d  Z  d d l Z d d l Z d d l m Z e j j e j j e  d  Z	 d   Z
 d   Z e d k rz e j   n  d S(   s   
Tests for stringmatching.py
iN(   t   get_search_scoress   data/example.pyc       b   C   sq  d }  d d d d d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d  d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK dL dM dN dO dP dQ dR dS dT dU dV dW dX dY dZ d[ d\ d] d^ d_ g_ } t  d` | da |  } | dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz d{ d| d} d~ d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d g_ k smt  dj S(   s!   Test stringmatching full results.s
   <b>{0}</b>s
   close panes   debug continues
   debug exits   debug step intos   debug step overs   debug step returns   fullscreen modes   layout preferencess   lock unlock paness   maximize panet   preferencest   quitt   restarts   save current layouts   switch to breakpointss   switch to consoles   switch to editors   switch to explorers   switch to find_in_filess   switch to historylogs   switch to helps   switch to ipython_consoles   switch to onlinehelps   switch to outline_explorers   switch to project_explorers   switch to variable_explorers   use next layouts   use previous layouts
   clear lines   clear shells   inspect current objectt   blockcommentt
   breakpoints	   close alls   code completions   conditional breakpointt	   configuret   copys	   copy linet   cutt   debugs   debug with winpdbt   deletes   delete lines   duplicate lines   end of documents   end of lines   file list managements	   find nexts   find previouss	   find texts   go to definitions
   go to lines   go to next files   go to previous files   kill next words   kill previous words   kill to line ends   kill to line starts   last edit locations   move line downs   move line ups   new files	   next chars   next cursor positions	   next lines	   next words	   open filet   pastes   previous chars   previous cursor positions   previous lines   previous wordt   prints   re-run last scriptt   redos   replace texts   rotate kill ringt   runs   run selections   save alls   save ass	   save files
   select alls   show/hide outlines   show/hide project explorers   start of documents   start of lines   toggle commentt   unblockcommentt   undot   yanks   run profilers   run analysist   layt   templateis   <b>lay</b>out preferencesi s   save current <b>lay</b>outi s   use next <b>lay</b>outi s   use previous <b>lay</b>outN(   s
   close panes
   close panei(   s   debug continues   debug continuei(   s
   debug exits
   debug exiti(   s   debug step intos   debug step intoi(   s   debug step overs   debug step overi(   s   debug step returns   debug step returni(   s   fullscreen modes   fullscreen modei(   s   layout preferencess   <b>lay</b>out preferencesi (   s   lock unlock paness   lock unlock panesi(   s   maximize panes   maximize panei(   R   R   i(   R   R   i(   R   R   i(   s   save current layouts   save current <b>lay</b>outi (   s   switch to breakpointss   switch to breakpointsi(   s   switch to consoles   switch to consolei(   s   switch to editors   switch to editori(   s   switch to explorers   switch to exploreri(   s   switch to find_in_filess   switch to find_in_filesi(   s   switch to historylogs   switch to historylogi(   s   switch to helps   switch to helpi(   s   switch to ipython_consoles   switch to ipython_consolei(   s   switch to onlinehelps   switch to onlinehelpi(   s   switch to outline_explorers   switch to outline_exploreri(   s   switch to project_explorers   switch to project_exploreri(   s   switch to variable_explorers   switch to variable_exploreri(   s   use next layouts   use next <b>lay</b>outi (   s   use previous layouts   use previous <b>lay</b>outi (   s
   clear lines
   clear linei(   s   clear shells   clear shelli(   s   inspect current objects   inspect current objecti(   R   R   i(   R   R   i(   s	   close alls	   close alli(   s   code completions   code completioni(   s   conditional breakpoints   conditional breakpointi(   R   R   i(   R   R   i(   s	   copy lines	   copy linei(   R   R   i(   R	   R	   i(   s   debug with winpdbs   debug with winpdbi(   R
   R
   i(   s   delete lines   delete linei(   s   duplicate lines   duplicate linei(   s   end of documents   end of documenti(   s   end of lines   end of linei(   s   file list managements   file list managementi(   s	   find nexts	   find nexti(   s   find previouss   find previousi(   s	   find texts	   find texti(   s   go to definitions   go to definitioni(   s
   go to lines
   go to linei(   s   go to next files   go to next filei(   s   go to previous files   go to previous filei(   s   inspect current objects   inspect current objecti(   s   kill next words   kill next wordi(   s   kill previous words   kill previous wordi(   s   kill to line ends   kill to line endi(   s   kill to line starts   kill to line starti(   s   last edit locations   last edit locationi(   s   move line downs   move line downi(   s   move line ups   move line upi(   s   new files   new filei(   s	   next chars	   next chari(   s   next cursor positions   next cursor positioni(   s	   next lines	   next linei(   s	   next words	   next wordi(   s	   open files	   open filei(   R   R   i(   s   previous chars   previous chari(   s   previous cursor positions   previous cursor positioni(   s   previous lines   previous linei(   s   previous words   previous wordi(   R   R   i(   s   re-run last scripts   re-run last scripti(   R   R   i(   s   replace texts   replace texti(   s   rotate kill rings   rotate kill ringi(   R   R   i(   s   run selections   run selectioni(   s   save alls   save alli(   s   save ass   save asi(   s	   save files	   save filei(   s
   select alls
   select alli(   s   show/hide outlines   show/hide outlinei(   s   show/hide project explorers   show/hide project exploreri(   s   start of documents   start of documenti(   s   start of lines   start of linei(   s   toggle comments   toggle commenti(   R   R   i(   R   R   i(   R   R   i(   s   run profilers   run profileri(   s   run analysiss   run analysisi(   R    t   AssertionError(   R   t   namest   full_results(    (    sE   lib/python2.7/site-packages/spyder/utils/tests/test_stringmatching.pyt   test_stringmatching_full   s"   													                   c       _   C   sl  d }  d d d d d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d  d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK dL dM dN dO dP dQ dR dS dT dU dV dW dX dY dZ d[ d\ d] d^ d_ g_ } t  d` | da |  db t dc t } | dl dm dn do g k sht  dk S(p   s)   Test stringmatching ordered and filtered.s
   <b>{0}</b>s
   close panes   debug continues
   debug exits   debug step intos   debug step overs   debug step returns   fullscreen modes   layout preferencess   lock unlock paness   maximize paneR   R   R   s   save current layouts   switch to breakpointss   switch to consoles   switch to editors   switch to explorers   switch to find_in_filess   switch to historylogs   switch to helps   switch to ipython_consoles   switch to onlinehelps   switch to outline_explorers   switch to project_explorers   switch to variable_explorers   use next layouts   use previous layouts
   clear lines   clear shells   inspect current objectR   R   s	   close alls   code completions   conditional breakpointR   R   s	   copy lineR   R	   s   debug with winpdbR
   s   delete lines   duplicate lines   end of documents   end of lines   file list managements	   find nexts   find previouss	   find texts   go to definitions
   go to lines   go to next files   go to previous files   kill next words   kill previous words   kill to line ends   kill to line starts   last edit locations   move line downs   move line ups   new files	   next chars   next cursor positions	   next lines	   next words	   open fileR   s   previous chars   previous cursor positions   previous lines   previous wordR   s   re-run last scriptR   s   replace texts   rotate kill ringR   s   run selections   save alls   save ass	   save files
   select alls   show/hide outlines   show/hide project explorers   start of documents   start of lines   toggle commentR   R   R   s   run profilers   run analysisR   R   t
   valid_onlyt   sorts   <b>lay</b>out preferencesi s   use next <b>lay</b>outi s   save current <b>lay</b>outi s   use previous <b>lay</b>outN(   s   layout preferencess   <b>lay</b>out preferencesi (   s   use next layouts   use next <b>lay</b>outi (   s   save current layouts   save current <b>lay</b>outi (   s   use previous layouts   use previous <b>lay</b>outi (   R    t   TrueR   (   R   R   t   order_filter_results(    (    sE   lib/python2.7/site-packages/spyder/utils/tests/test_stringmatching.pyt    test_stringmatching_order_filter   sR    													   t   __main__(   t   __doc__t   ost   pytestt   spyder.utils.stringmatchingR    t   patht   joint   dirnamet   __file__t	   TEST_FILER   R   t   __name__t   main(    (    (    sE   lib/python2.7/site-packages/spyder/utils/tests/test_stringmatching.pyt   <module>	   s   !		/