ó
‹²,]c           @   sµ   d  d l  Z  d  d l Z d  d l Z d  d l Z e  j j e  j j e  j ƒ  d ƒ ƒ Z e j	 j
 d d d d g d f d d	 d
 d d g d f d d	 d g d f g ƒ d „  ƒ Z d S(   iÿÿÿÿNt   spyders    pattern,exclude_patterns,messages   isinstance\(.*,.*str\)s   py3compat.pys   example_latin1.pysU   Don't use builtin isinstance() function,use spyder.py3compat.is_text_string() insteads    ^[\s\#]*\bprint\(((?!file=).)*\)s   .*test.*s
   example.pyt   binaryornots   Don't use print() functions, s.   for debuging you could use debug_print insteads!   ^[\s\#]*\bprint\s+(?!>>)((?!#).)*s   Don't use print __builtin__, c         C   sy  t  j |  d ƒ }  d } x5t j t ƒ D]$\ } } } x| D]
} t g  | D] } t  j | | ƒ ^ qO ƒ }	 |	 pž t g  | D] } t  j | | ƒ ^ q€ ƒ }	 | j d ƒ r? |	 r? t j j	 | | ƒ }
 t
 j |
 d d ƒc } xY t | ƒ D]K \ } } x< t  j |  | ƒ D]( } d j |
 | d | ƒ GH| d 7} qWqñ WWd QXq? q? Wq) W| d k sut d	 j | | ƒ ƒ ‚ d S(
   sè   
    This test is used for discouraged using of some expresions that could
    introduce errors, and encourage use spyder function instead.

    If you want to skip some line from this test just use:
        # spyder: test-skip
    s   ((?!# spyder: test-skip)\s)*$i    s   .pyt   encodings   utf-8s   {}
line:{}, {}i   Ns   {}
{} errors found(   t   ret   compilet   ost   walkt	   root_patht   anyt   searcht   endswitht   patht   joint   codecst   opent	   enumeratet   finditert   formatt   AssertionError(   t   patternt   exclude_patternst   messaget   foundt   dir_namet   _t	   file_listt   fnamet   ext   excludet   filet   ft   it   linet   match(    (    s9   lib/python2.7/site-packages/spyder/tests/test_dont_use.pyt   test_dont_use   s    +1#(   s   Don't use print() functions, s.   for debuging you could use debug_print instead(   s   Don't use print __builtin__, s.   for debuging you could use debug_print instead(   R   R   R   t   pytestR   t   realpathR   t   getcwdR   t   markt   parametrizeR"   (    (    (    s9   lib/python2.7/site-packages/spyder/tests/test_dont_use.pyt   <module>   s   '		  