ó
aDâWâ?  c           @   sY   d  d l  Z d  d l j j Z d  d l Z d  d l Z d e f d „  ƒ  YZ	 d „  Z
 d S(   iÿÿÿÿNt   CommonFSTestsc           B   sÀ  e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e j j j d ƒ d „  ƒ Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d „  Z$ e j j j d ƒ d  „  ƒ Z% d! „  Z& d" „  Z' d# „  Z( d$ „  Z) d% „  Z* d& „  Z+ d' „  Z, d( „  Z- d) „  Z. d* „  Z/ d+ „  Z0 d, „  Z1 d- „  Z2 d. „  Z3 d/ „  Z4 d0 „  Z5 d1 „  Z6 d2 „  Z7 d3 „  Z8 d4 „  Z9 d5 „  Z: d6 „  Z; d7 „  Z< d8 „  Z= d9 „  Z> d: „  Z? d; „  Z@ d< „  ZA d= „  ZB d> „  ZC d? „  ZD d@ „  ZE dA „  ZF dB „  ZG e j j jH dC ƒ dD „  ƒ ZI e j j jH dC ƒ dE „  ƒ ZJ RS(F   c         C   sç   | j  | ƒ } | | k } | sÝ t j d
 | f d | | f ƒ i d t j ƒ  k sc t j | ƒ rr t j | ƒ n d d 6d t j ƒ  k sš t j | ƒ r© t j | ƒ n d d 6} d i | d	 6} t t j | ƒ ƒ ‚ n  d  } d  S(   Ns   ==s   %(py0)s == %(py2)st   pt   py0t   path1t   py2t    s   assert %(py4)st   py4(   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(
   t	   __class__t
   @pytest_art   _call_reprcomparet   @py_builtinst   localst   _should_repr_global_namet	   _safereprt   AssertionErrort   _format_explanationt   None(   t   selfR   R   t   @py_assert1t   @py_format3t   @py_format5(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_constructor_equality   s      “   c         C   sö   | j  d ƒ } | j  d ƒ } | | k } | sì t j d | f d | | f ƒ i d t j ƒ  k sr t j | ƒ r t j | ƒ n d d 6d t j ƒ  k s© t j | ƒ r¸ t j | ƒ n d d 6} d i | d
 6} t t j | ƒ ƒ ‚ n  d  } d  S(   Nt	   sampledirs   ==s   %(py0)s == %(py2)st   p1R   t   p2R   R   s   assert %(py4)sR   (   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(
   t   joinR   R	   R
   R   R   R   R   R   R   (   R   R   R   R   R   R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_eq_nonstring
   s      “   c         C   s  | j  } | ƒ  } | | k } | s t j d | f d | | f ƒ i d t j ƒ  k sf t j | ƒ ru t j | ƒ n d d 6d t j ƒ  k s t j | ƒ r¬ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} d i | d
 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(   Ns   ==sB   %(py0)s == %(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s.new
}()
}R   R   R   R   t   py6R   s   assert %(py8)st   py8(   s   ==(   sB   %(py0)s == %(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s.new
}()
}s   assert %(py8)s(
   t   newR   R	   R
   R   R   R   R   R   R   (   R   R   t   @py_assert3t   @py_assert5R   t   @py_format7t   @py_format9(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_new_identical   s    	 	   ³   c   
      C   s  | j  d ƒ } t | ƒ } | j } d } | | ƒ } | sÉ d d i d t j ƒ  k sg t j | ƒ rv t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } | j } t | ƒ } | | ƒ } | sùd d	 i t j | ƒ d
 6d t j ƒ  k s9t j | ƒ rHt j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s€t j t ƒ rt j t ƒ n d d 6d t j ƒ  k s·t j | ƒ rÆt j | ƒ n d d 6t j | ƒ d 6}	 t t j	 |	 ƒ ƒ ‚ n  d  } } } d  S(   NR   R   sJ   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.endswith
}(%(py4)s)
}t   strpR   R   R   R   sj   assert %(py8)s
{%(py8)s = %(py2)s
{%(py2)s = %(py0)s.startswith
}(%(py6)s
{%(py6)s = %(py3)s(%(py4)s)
})
}R   t   strt   py3R   (   R   R$   t   endswithR
   R   R   R   R   R   R   R   t
   startswith(
   R   R   R   R#   R   R   R   R    t   @py_assert7R!   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt	   test_join   s     	    u  	    ã  c   
      C   s$  | j  | j d ƒ } t | ƒ } | j } d } | | ƒ } | sÐ d d i d t j ƒ  k sn t j | ƒ r} t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } | j } t | ƒ } | | ƒ } | s d d	 i t j | ƒ d
 6d t j ƒ  k s@t j | ƒ rOt j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s‡t j t ƒ r–t j t ƒ n d d 6d t j ƒ  k s¾t j | ƒ rÍt j | ƒ n d d 6t j | ƒ d 6}	 t	 t j
 |	 ƒ ƒ ‚ n  d  } } } | j  | j d d ƒ } t | ƒ } | j } d } | | ƒ } | sâd d i d t j ƒ  k s€t j | ƒ rt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } | j } t | ƒ } | | ƒ } | sd d	 i t j | ƒ d
 6d t j ƒ  k sRt j | ƒ rat j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s™t j t ƒ r¨t j t ƒ n d d 6d t j ƒ  k sÐt j | ƒ rßt j | ƒ n d d 6t j | ƒ d 6}	 t	 t j
 |	 ƒ ƒ ‚ n  d  } } } d  S(   NR   R   sJ   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.endswith
}(%(py4)s)
}R#   R   R   R   R   sj   assert %(py8)s
{%(py8)s = %(py2)s
{%(py2)s = %(py0)s.startswith
}(%(py6)s
{%(py6)s = %(py3)s(%(py4)s)
})
}R   R$   R%   R   i   (   R   t   sepR$   R&   R
   R   R   R   R   R   R   R   R'   (
   R   R   t   newpathR#   R   R   R   R    R(   R!   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_join_normalized   s@    	    u  	    ã  	    u  	    ã  c         C   sä   | j  ƒ  } | | k } | sÚ t j d
 | f d | | f ƒ i d t j ƒ  k s` t j | ƒ ro t j | ƒ n d d 6d t j ƒ  k s— t j | ƒ r¦ t j | ƒ n d d 6} d i | d	 6} t t j | ƒ ƒ ‚ n  d  } d  S(   Ns   ==s   %(py0)s == %(py2)sR   R   R+   R   R   s   assert %(py4)sR   (   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(
   R   R   R	   R
   R   R   R   R   R   R   (   R   R   R+   R   R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_join_noargs"   s      “   c         C   s¤  | j  d ƒ } | d } | j } | ƒ  } | s® d d i d t j ƒ  k s\ t j | ƒ rk t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } | j
 } | ƒ  } | sMd d	 i d t j ƒ  k sû t j | ƒ r
t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } | j } | ƒ  } | sìd d
 i d t j ƒ  k sšt j | ƒ r©t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } | j } | ƒ  } | } | s’d d i d t j ƒ  k s@t j | ƒ rOt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(   Nt   samplet   dirR   s@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}R   R   R   R   sA   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.exists
}()
}s@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.isdir
}()
}sE   assert not %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.isfile
}()
}(   R   t   checkR
   R   R   R   R   R   R   R   t   existst   isdirt   isfile(   R   R   R   R   R   R   R   t   @py_format6(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_add_something&   s6    
	 	  e  
	 	  e  
	 	  e  
	 	   e  c   	      C   sÎ  | j  d d ƒ } | j ƒ  d } | | j  d ƒ | g } | | k } | sá t j d | f d | | f ƒ i d t j ƒ  k sŽ t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } | j d t ƒ d  } | | j  d ƒ | g } | | k } | sÀt j d | f d | | f ƒ i d t j ƒ  k smt j | ƒ r|t j | ƒ n d d 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   NR   t	   otherfileiýÿÿÿs   ==s   %(py0)s == %(py3)st   parR   R%   R   s   assert %(py5)st   py5t   reversei   t   revpar(   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   R   t   partsR   R	   R
   R   R   R   R   R   R   t   True(	   R   R   R+   R7   t   @py_assert2R   t   @py_format4R4   R:   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt
   test_parts.   s"       l   
   l   c         C   sö   | j  d ƒ } | j | ƒ } | | k } | sì t j d | f d | | f ƒ i d t j ƒ  k sr t j | ƒ r t j | ƒ n d d 6d t j ƒ  k s© t j | ƒ r¸ t j | ƒ n d d 6} d i | d
 6} t t j	 | ƒ ƒ ‚ n  d  } d  S(   NR   s   ==s   %(py0)s == %(py2)st   xR   R   R   R   s   assert %(py4)sR   (   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(   R   t   commonR   R	   R
   R   R   R   R   R   R   (   R   R   t   otherR@   R   R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_common6   s      “   c         C   sþ  | d d } t  | j ƒ  ƒ } | j ƒ  d } | | } | | k } | st j d | f d | | f ƒ i d t j ƒ  k sŽ t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k sÕ t j | ƒ rä t j | ƒ n d d	 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } | | k } | sôt j d | f d | | f ƒ i d t j ƒ  k szt j | ƒ r‰t j | ƒ n d d 6d t j ƒ  k s±t j | ƒ rÀt j | ƒ n d d 6}	 d i |	 d 6}
 t	 t j
 |
 ƒ ƒ ‚ n  d  } d  S(   Nt
   dirnoexists   nonexisting filet   ins   (%(py0)s / %(py2)s) in %(py5)sR   R   R   R7   R8   R   s   assert %(py7)st   py7s   %(py0)s in %(py2)ss   assert %(py4)sR   (   RE   (   s   (%(py0)s / %(py2)s) in %(py5)ss   assert %(py7)s(   RE   (   s   %(py0)s in %(py2)ss   assert %(py4)s(   t   listR;   t   popR   R	   R
   R   R   R   R   R   R   (   R   R   R+   R7   R   R   t   @py_assert4R4   t   @py_format8R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_parents_nonexisting_file;   s"    
 
   £     “   c   
      C   se  | j  d ƒ } | j } d } | d | ƒ } | sÀ d d i d t j ƒ  k s^ t j | ƒ rm t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } } | j } d
 } | d | ƒ } | sd d i d t j ƒ  k st j | ƒ r,t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } } | j
 } d } | | k } | sSt j d | f d | | f ƒ i d t j ƒ  k sðt j | ƒ rÿt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} d i | d 6}	 t t j |	 ƒ ƒ ‚ n  d  } } } d  S(   NR   t   basenameR   sP   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(basename=%(py4)s)
}R+   R   R   R   R   t   xyzt   notbasenamesS   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(notbasename=%(py4)s)
}s   ==s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)sR8   s   assert %(py7)sRF   (   s   ==(   s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)ss   assert %(py7)s(   R   R0   R
   R   R   R   R   R   R   R   RL   R	   (
   R   R   R+   R   R   R   R    RI   R4   RJ   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_basename_checksB   s.    	    u  	    u  	    |   c         C   s]  | j  d ƒ } | j } d } | d | ƒ } | sÀ d d i d t j ƒ  k s^ t j | ƒ rm t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } } | j
 } | sSt j d ƒ d
 i d t j ƒ  k st j | ƒ r t j | ƒ n d d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } d  S(   NR   RL   R   sP   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(basename=%(py4)s)
}R+   R   R   R   R   s.   
>assert %(py2)s
{%(py2)s = %(py0)s.basename
}(   R   R0   R
   R   R   R   R   R   R   R   RL   t   _format_assertmsg(   R   R   R+   R   R   R   R    R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_basenameH   s    	    u  	  ^  c         C   s[  | j  d ƒ } | j } t | ƒ } | | k } | sIt j d | f d | | f ƒ i d t j ƒ  k sx t j | ƒ r‡ t j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s¿ t j t ƒ rÎ t j t ƒ n d d 6d	 t j ƒ  k sö t j | ƒ rt j | ƒ n d	 d
 6t j | ƒ d 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } d  S(   NR   s   ==sM   %(py2)s
{%(py2)s = %(py0)s.dirname
} == %(py7)s
{%(py7)s = %(py4)s(%(py5)s)
}R+   R   R   R$   R   R   R8   RF   R   s   assert %(py9)st   py9(   s   ==(   sM   %(py2)s
{%(py2)s = %(py0)s.dirname
} == %(py7)s
{%(py7)s = %(py4)s(%(py5)s)
}s   assert %(py9)s(   R   t   dirnameR$   R   R	   R
   R   R   R   R   R   R   (   R   R   R+   R   t   @py_assert6R   RJ   t   @py_format10(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_dirnameM   s    	    ê   c         C   s!  | j  d ƒ } | j } | ƒ  } | | k } | st j d | f d | | f ƒ i d t j ƒ  k su t j | ƒ r„ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6d t j ƒ  k sÌ t j | ƒ rÛ t j | ƒ n d d	 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } d  S(   NR   s   ==sF   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.dirpath
}()
} == %(py6)sR+   R   R   R   R   R   R   s   assert %(py8)sR   (   s   ==(   sF   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.dirpath
}()
} == %(py6)ss   assert %(py8)s(   R   t   dirpathR   R	   R
   R   R   R   R   R   R   (   R   R   R+   R   R   R   R    R!   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_dirpathQ   s    	 	   ³   c         C   s•  | j  d ƒ } | j } d } | | ƒ } | j  } d } | | ƒ } | | k }	 |	 sst j d |	 f d | | f ƒ i d t j ƒ  k s™ t j | ƒ r¨ t j | ƒ n d d 6d t j ƒ  k sÐ t j | ƒ rß t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 d i |
 d 6} t t j	 | ƒ ƒ ‚ n  d  } } } }	 } } } d  S(   NR   R@   s   ==sŠ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.dirpath
}(%(py4)s)
} == %(py14)s
{%(py14)s = %(py10)s
{%(py10)s = %(py8)s.join
}(%(py12)s)
}R   R   R+   R   R   R   R   t   py12t   py14t   py10R   s   assert %(py16)st   py16(   s   ==(   sŠ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.dirpath
}(%(py4)s)
} == %(py14)s
{%(py14)s = %(py10)s
{%(py10)s = %(py8)s.join
}(%(py12)s)
}s   assert %(py16)s(   R   RW   R   R	   R
   R   R   R   R   R   R   (   R   R   R+   R   R   R   t   @py_assert9t   @py_assert11t   @py_assert13R(   t   @py_format15t   @py_format17(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_dirpath_with_argsU   s    	   	     ó   c         C   sA  | j  d ƒ } | j d d ƒ } | j } d } | | k } | sç t j d | f d | | f ƒ i d t j ƒ  k s„ t j | ƒ r“ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d	 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } | j } | ƒ  } | j }	 |	 ƒ  }
 | |
 k } | s't j d | f d | |
 f ƒ i t j |	 ƒ d 6d t j ƒ  k s}t j | ƒ rŒt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6d t j ƒ  k sÔt j | ƒ rãt j | ƒ n d d 6t j |
 ƒ d 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } }	 }
 d  S(   Nt
   samplefileRL   t   samplefile2s   ==s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)st   newbaseR   R   R8   R   s   assert %(py7)sRF   s|   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.dirpath
}()
} == %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s.dirpath
}()
}R   R   R+   R   R[   s   assert %(py12)sRY   (   s   ==(   s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)ss   assert %(py7)s(   s   ==(   s|   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.dirpath
}()
} == %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s.dirpath
}()
}s   assert %(py12)s(   R   R   RL   R   R	   R
   R   R   R   R   R   R   RW   (   R   R   R+   Re   R   RI   R   R4   RJ   R(   R]   R   t   @py_format11t   @py_format13(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_newbasenameY   s(    	    |   	 	 	 	   Ó   c   
      C   s  | j  } d } | | ƒ } | j } | ƒ  } | } | sç d d i t j | ƒ d 6d t j ƒ  k su t j | ƒ r„ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | sýd d i t j | ƒ d 6d t j ƒ  k s{t j | ƒ rŠt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d 6t j | ƒ d
 6}	 t t j |	 ƒ ƒ ‚ n  d  } } } } } } d  S(   Nt   does_not_existR   s~   assert not %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}()
}R   R   R   R   R   R   R[   i    R1   s‰   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(exists=%(py10)s)
}RY   (
   R   R0   R   R   R
   R   R   R   R   R   (
   R   R   R   R   R   R(   R]   R^   t   @py_format12Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_not_exists_   s(    	   	 	   •  	   	    ¥  c         C   sý  | j  } d } | | ƒ } | j } | ƒ  } | sà d d i t j | ƒ d 6d t j ƒ  k sn t j | ƒ r} t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6} t t j | ƒ ƒ ‚ n  d  } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | sòd d i t j | ƒ d 6d t j ƒ  k spt j | ƒ rt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d 6t j | ƒ d
 6}	 t t j |	 ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j
 } | ƒ  } | sìd d i t j | ƒ d 6d t j ƒ  k szt j | ƒ r‰t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6} t t j | ƒ ƒ ‚ n  d  } } } } } | j  } d } | | ƒ } | j } | ƒ  } | sâd d i t j | ƒ d 6d t j ƒ  k spt j | ƒ rt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6} t t j | ƒ ƒ ‚ n  d  } } } } } | j  } d } | | ƒ } | j } | ƒ  } | } | sßd d i t j | ƒ d 6d t j ƒ  k smt j | ƒ r|t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } } } d  S(   NRc   R   sz   assert %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}()
}R   R   R   R   R   R   R[   i   R1   s‰   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(exists=%(py10)s)
}RY   s{   assert %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.exists
}()
}s{   assert %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.isfile
}()
}s~   assert not %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.isdir
}()
}(   R   R0   R   R   R
   R   R   R   R   R   R1   R3   R2   (   R   R   R   R   R   R(   R]   Rf   R^   Rg   Rj   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_existsc   s^    	   	 	  •  	   	    ¥  	   	 	  •  	   	 	  •  	   	 	   •  c         C   sR  t  | j d ƒ ƒ GH| j } d } | | ƒ } | j } d } | d | ƒ } | sd d i t j | ƒ d 6d t j ƒ  k sŽ t j | ƒ r t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } } } | j } d } | | ƒ } | j } d } | d | ƒ } | s&d d i t j | ƒ d 6d t j ƒ  k s¤t j | ƒ r³t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } } } | j } d } | | ƒ } | j } d } | d | ƒ } | }	 |	 sCd d i t j | ƒ d 6d t j ƒ  k sÁt j | ƒ rÐt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 t t j	 |
 ƒ ƒ ‚ n  d  } } } } } } }	 | j } d } | | ƒ } | j } | ƒ  } | sAd d i t j | ƒ d 6d t j ƒ  k sÏt j | ƒ rÞt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } } | j } d } | | ƒ } | j } | ƒ  } | } | s>d d i t j | ƒ d 6d t j ƒ  k sÌt j | ƒ rÛt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } } } | j } d } | | ƒ } | j } | ƒ  } | s8d d i t j | ƒ d 6d t j ƒ  k sÆt j | ƒ rÕt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } } d  S(   NR   i   R/   R   s†   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(dir=%(py10)s)
}R   R   R   R   R   R   RY   R[   Rc   t   notdirs‰   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(notdir=%(py10)s)
}sŠ   assert not %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(dir=%(py10)s)
}s{   assert %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.exists
}()
}s~   assert not %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.isdir
}()
}s{   assert %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.isfile
}()
}(   t   reprR   R0   R   R   R
   R   R   R   R   R   R1   R2   R3   (   R   R   R   R   R   R(   R]   R^   Rg   R_   t   @py_format14Rf   Rj   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_dirj   sx    	   	    ¥  	   	    ¥  	   	     ¥  	   	 	  •  	   	 	   •  	   	 	  •  c         C   sl  | j  } d } | | ƒ } | j } d } | d | ƒ } | sü d d i t j | ƒ d 6d t j ƒ  k sz t j | ƒ r‰ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j
 } d } | | ƒ } | sd d i t j | ƒ d 6d t j ƒ  k st j | ƒ rœt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j
 } d } | | ƒ } | }	 |	 s)d d i t j | ƒ d 6d t j ƒ  k s§t j | ƒ r¶t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } } } }	 | j  } d } | | ƒ } | j } d } | d | ƒ } | }	 |	 sJd d i t j | ƒ d 6d t j ƒ  k sÈt j | ƒ r×t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } } } }	 d  S(   NRc   s   s*et   fnmatchR   sŠ   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(fnmatch=%(py10)s)
}R   R   R   R   R   R   RY   R[   s„   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.fnmatch
}(%(py10)s)
}s   s*xsˆ   assert not %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.fnmatch
}(%(py10)s)
}sŽ   assert not %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(fnmatch=%(py10)s)
}(   R   R0   R   R   R
   R   R   R   R   R   Rq   (   R   R   R   R   R   R(   R]   R^   Rg   R_   Ro   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_fnmatch_files   sT    	   	    ¥  	   	    ¥  	   	     ¥  	   	     ¥  c         C   s  | j  j d g ƒ } | j d ƒ } | j } | d | ƒ } | sö d d i d t j ƒ  k sm t j | ƒ r| t j | ƒ n d d 6t j | ƒ d 6d	 t j ƒ  k s´ t j | ƒ rÃ t j | ƒ n d	 d
 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   Ns   s*fileRc   Rq   R   sO   assert %(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.check
}(fnmatch=%(py3)s)
}t   sfileR   R   t   patternR%   R8   (   R*   R   R0   R
   R   R   R   R   R   R   R   (   R   R   Rt   Rs   R   RI   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_fnmatch_diry   s    	   œ  c         C   s…  | j  d d ƒ } | j } | | ƒ } | j } | j  } d d g } | | ƒ } | | k }	 |	 rÁt j d f |	 f d f | | f ƒ i	 t j | ƒ d 6t j | ƒ d 6d t j ƒ  k pÉ t j | ƒ rÛ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6d t j ƒ  k p t j | ƒ r2t j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k pgt j | ƒ ryt j | ƒ n d d 6t j | ƒ d 6}
 d d i |
 d 6} t	 t j
 | ƒ ƒ ‚ n  t } } }	 } } } } | j } | d | ƒ } | r²d d i d t j ƒ  k p&t j | ƒ r8t j | ƒ n d d 6t j | ƒ d
 6d t j ƒ  k pmt j | ƒ rt j | ƒ n d d 6t j | ƒ d 6} t	 t j
 | ƒ ƒ ‚ n  t } } | j } | d | ƒ } | rd d i d t j ƒ  k pt j | ƒ rt j | ƒ n d d 6t j | ƒ d
 6d t j ƒ  k pJt j | ƒ r\t j | ƒ n d d 6t j | ƒ d 6} t	 t j
 | ƒ ƒ ‚ n  t } } | j } | d | ƒ } | }	 |	 rsd d i d t j ƒ  k pçt j | ƒ rùt j | ƒ n d d 6t j | ƒ d
 6d t j ƒ  k p.t j | ƒ r@t j | ƒ n d d 6t j | ƒ d 6} t	 t j
 | ƒ ƒ ‚ n  t } } }	 d  S(   NR   R6   s   ==s¡   %(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.relto
}(%(py3)s)
} == %(py15)s
{%(py15)s = %(py11)s
{%(py11)s = %(py9)s
{%(py9)s = %(py7)s.sep
}.join
}(%(py13)s)
}RR   t   py11t   lR   t   py13R   R   R%   R8   RF   t   py15R   s   assert %(py17)st   py17t   reltosM   assert %(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.check
}(relto=%(py3)s)
}t   notreltosP   assert %(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.check
}(notrelto=%(py3)s)
}sQ   assert not %(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.check
}(relto=%(py3)s)
}(   R   R{   R*   R   R	   R   R
   R   R   R   R   R   R0   (   R   R   Rw   R   RI   t   @py_assert8t   @py_assert10t   @py_assert12t   @py_assert14RT   t   @py_format16t   @py_format18R4   R    (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt
   test_relto~   sB    	  	 	     ÿ 1   	   œ  
	   œ  
	    œ  c         C   sÍ  | } | j  } | j | ƒ } d } | | k } | sË t j d | f d  | | f ƒ i d t j ƒ  k sx t j | ƒ r‡ t j | ƒ n d d 6t j | ƒ d 6} d! i | d	 6} t t j	 | ƒ ƒ ‚ n  d  } } | j | j d
 d ƒ ƒ } d
 } | | }	 d }
 |	 |
 } | | k } | sþt j d" | f d# | | f ƒ i d t j ƒ  k sdt j | ƒ rst j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s«t j | ƒ rºt j | ƒ n d d 6t j |
 ƒ d 6} d$ i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } }	 }
 } | j | j ƒ  j d ƒ ƒ } d } | | }	 d }
 |	 |
 } | | k } | s@t j d% | f d& | | f ƒ i d t j ƒ  k s¦t j | ƒ rµt j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k sít j | ƒ rüt j | ƒ n d d 6t j |
 ƒ d 6} d' i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } }	 }
 } | j } | j } | ƒ  }
 | |
 ƒ } d } | | k } | s¡t j d( | f d) | | f ƒ i t j | ƒ d 6d t j ƒ  k sçt j | ƒ röt j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s.t j | ƒ r=t j | ƒ n d d 6t j | ƒ d	 6t j |
 ƒ d 6t j | ƒ d 6} d* i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } }
 } } } | j } d
 } | | ƒ }	 d
 } |	 | k } | s³t j d+ | f d, |	 | f ƒ i d t j ƒ  k s0t j | ƒ r?t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6t j |	 ƒ d 6} d- i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } }	 } } d  S(.   Nt   .s   ==s   %(py0)s == %(py3)st   sR   R%   R   s   assert %(py5)sR8   t   hellot   worlds*   %(py0)s == ((%(py3)s + %(py4)s) + %(py7)s)R*   R   RF   s   assert %(py10)sR[   t   sisters   ..s†   %(py9)s
{%(py9)s = %(py2)s
{%(py2)s = %(py0)s.bestrelpath
}(%(py7)s
{%(py7)s = %(py5)s
{%(py5)s = %(py3)s.dirpath
}()
})
} == %(py12)sRR   t   curdirR   RY   s   assert %(py14)sRZ   sQ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.bestrelpath
}(%(py4)s)
} == %(py9)sR   s   assert %(py11)sRv   (   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   s   ==(   s*   %(py0)s == ((%(py3)s + %(py4)s) + %(py7)s)s   assert %(py10)s(   s   ==(   s*   %(py0)s == ((%(py3)s + %(py4)s) + %(py7)s)s   assert %(py10)s(   s   ==(   s†   %(py9)s
{%(py9)s = %(py2)s
{%(py2)s = %(py0)s.bestrelpath
}(%(py7)s
{%(py7)s = %(py5)s
{%(py5)s = %(py3)s.dirpath
}()
})
} == %(py12)ss   assert %(py14)s(   s   ==(   sQ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.bestrelpath
}(%(py4)s)
} == %(py9)ss   assert %(py11)s(   R*   t   bestrelpathR   R	   R
   R   R   R   R   R   R   R   RW   (   R   R   R‰   R*   R…   R=   R   R>   R4   R   RT   R}   R!   Rf   RI   R^   R~   Rg   R`   R   R(   RU   Rj   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_bestrelpath…   sj    	   l   
 
  
   ³    
  
   ³   	 	 	     ã   	      œ   c         C   sê  | j  d ƒ } | j  d ƒ } | j } | | ƒ } | } | sô d d i d t j ƒ  k sk t j | ƒ rz t j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s² t j | ƒ rÁ t j | ƒ n d d	 6t j | ƒ d
 6} t t j | ƒ ƒ ‚ n  d  } } } | j } | | ƒ } | } | sØd d i d t j ƒ  k sOt j | ƒ r^t j | ƒ n d d 6t j | ƒ d 6d t j ƒ  k s–t j | ƒ r¥t j | ƒ n d d	 6t j | ƒ d
 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(   Nt   bcdet   bR   sK   assert not %(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.relto
}(%(py3)s)
}t   l1R   R   t   l2R%   R8   (
   R   R{   R
   R   R   R   R   R   R   R   (   R   R   RŽ   R   R   RI   RT   R    (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_relto_not_relative“   s     	    œ  	    œ  s   sys.platform.startswith('java')c   	      C   s  | j  ƒ  } | j } d } | | ƒ } | | k } | s%t j d | f d | | f ƒ i d t j ƒ  k s{ t j | ƒ rŠ t j | ƒ n d d 6d t j ƒ  k s² t j | ƒ rÁ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } | j } d } | | ƒ } | | k } | sPt j d | f d | | f ƒ i d t j ƒ  k s¦t j | ƒ rµt j | ƒ n d d 6d t j ƒ  k sÝt j | ƒ rìt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d	 6t j | ƒ d
 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } t j j t j j d ƒ d  S(   NR   RE   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} in %(py8)sR   R   Rw   R   R   R   R   R   s   assert %(py10)sR[   Rc   s"   path1.join('samplefile').listdir()(   RE   (   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} in %(py8)ss   assert %(py10)s(   RE   (   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} in %(py8)ss   assert %(py10)s(   t   listdirR   R   R	   R
   R   R   R   R   R   R   t   pyt   testt   raisest   errort   ENOTDIR(	   R   R   Rw   R   R   R   R(   R!   Rf   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_listdir™   s*    	     Ã   	     Ã   c         C   s-  | j  d ƒ } t | ƒ } | sÅ d d i d t j ƒ  k sL t j t ƒ r[ t j t ƒ n d d 6d t j ƒ  k sƒ t j | ƒ r’ t j | ƒ n d d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } | d	 } | s#t j
 | j d
 ƒ ƒ d i t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } d  S(   Ns   s*dirR   s,   assert %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
}t   lenR   Rw   t   py1R%   i    R   s   
>assert %(py1)s(   R‘   R˜   R
   R   R   R   R   R   R   R   RP   R   (   R   R   Rw   R=   R>   t   @py_assert0t   @py_format2(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_listdir_fnmatchstring¡   s      Œ  
  0  c         C   sw  | j  d „  ƒ } | j } d } | | ƒ } | | k } | s+t j d | f d | | f ƒ i d t j ƒ  k s t j | ƒ r t j | ƒ n d d 6d t j ƒ  k s¸ t j | ƒ rÇ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } | j } d } | | ƒ } | | k } | }	 |	 s]t j d | f d | | f ƒ i d t j ƒ  k s³t j | ƒ rÂt j | ƒ n d d 6d t j ƒ  k sêt j | ƒ rùt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6} d i | d 6}
 t t j	 |
 ƒ ƒ ‚ n  d  } } } } }	 d  S(   Nc         S   s   |  j  d d ƒ S(   NR/   i   (   R0   (   R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   <lambda>§   s    R   RE   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} in %(py8)sR   R   Rw   R   R   R   R   R   s   assert %(py10)sR[   Rc   s   assert not %(py10)s(   RE   (   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} in %(py8)ss   assert %(py10)s(   RE   (   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} in %(py8)ss   assert not %(py10)s(   R‘   R   R   R	   R
   R   R   R   R   R   R   (   R   R   Rw   R   R   R   R(   R!   Rf   R^   Rj   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_listdir_filter¦   s(    	     Ã   	      Ã   c   
      C   sR  | j  d „  d t ƒ} | j } d } | | ƒ } | d } | | k } | st j d | f d | | f ƒ i d t j ƒ  k s‘ t j | ƒ r  t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6} d i | d 6}	 t	 t j
 |	 ƒ ƒ ‚ n  d  } } } } } | j } d } | | ƒ } | d } | | k } | s&t j d | f d | | f ƒ i d t j ƒ  k s£t j | ƒ r²t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6} d i | d 6}	 t	 t j
 |	 ƒ ƒ ‚ n  d  } } } } } | j } d } | | ƒ } | d } | | k } | s8t j d | f d | | f ƒ i d t j ƒ  k sµt j | ƒ rÄt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6} d i | d 6}	 t	 t j
 |	 ƒ ƒ ‚ n  d  } } } } } d  S(   Nc         S   s   |  j  d d ƒ S(   Nt
   basestartsR.   (   R0   (   R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyR   ¬   s    t   sortR   i    s   ==sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} == %(py9)sR   R   RR   R   R   R   R   s   assert %(py11)sRv   Rc   i   t   samplepicklei   (   s   ==(   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} == %(py9)ss   assert %(py11)s(   s   ==(   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} == %(py9)ss   assert %(py11)s(   s   ==(   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} == %(py9)ss   assert %(py11)s(   R‘   R<   R   R   R	   R
   R   R   R   R   R   R   (
   R   R   Rw   R   R   R   R}   R(   RU   Rj   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_listdir_sorted«   s>    	   
   œ   	   
   œ   	   
   œ   c         C   s<  g  } x* | j  ƒ  D] } | j | j | ƒ ƒ q Wd } | | k } | sà t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s t j | ƒ r¬ t j | ƒ n d d 6} d i | d	 6} t	 t j
 | ƒ ƒ ‚ n  d  } } | j } | j }	 d d
 g }
 |	 |
 ƒ } | | k } | s"t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k sxt j | ƒ r‡t j | ƒ n d d 6t j | ƒ d 6t j |	 ƒ d 6t j |
 ƒ d 6d t j ƒ  k sßt j | ƒ rît j | ƒ n d d 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } }	 }
 } } d  S(   NR   RE   s   %(py1)s in %(py3)sR™   Rw   R%   R   s   assert %(py5)sR8   R6   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)sR   R   R   R   R   R   R[   s   assert %(py12)sRY   (   RE   (   s   %(py1)s in %(py3)ss   assert %(py5)s(   RE   (   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)ss   assert %(py12)s(   t   visitt   appendR{   R   R	   R   R
   R   R   R   R   R   R*   R   (   R   R   Rw   t   iRš   R=   R>   R4   R   R   R   R(   R]   Rf   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_nofilter±   s(       l   
	 	     Ó   c         C   sP  g  } x3 | j  d  d „  ƒ D] } | j | j | ƒ ƒ q Wd } | | k } | sé t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s¦ t j	 | ƒ rµ t j | ƒ n d d 6} d i | d
 6} t
 t j | ƒ ƒ ‚ n  d  } } | j } | j }	 d d g }
 |	 |
 ƒ } | | k } | } | s2t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k sˆt j	 | ƒ r—t j | ƒ n d d 6t j | ƒ d 6t j |	 ƒ d 6t j |
 ƒ d 6d t j ƒ  k sït j	 | ƒ rþt j | ƒ n d d 6} d i | d 6} t
 t j | ƒ ƒ ‚ n  d  } }	 }
 } } } d  S(   Nc         S   s   |  j  d k S(   NR   (   RL   (   R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyR   º   s    R   RE   s   %(py1)s in %(py3)sR™   Rw   R%   R   s   assert %(py5)sR8   R6   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)sR   R   R   R   R   R   R[   s   assert not %(py12)sRY   (   RE   (   s   %(py1)s in %(py3)ss   assert %(py5)s(   RE   (   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)ss   assert not %(py12)s(   R£   R   R¤   R{   R   R	   R   R
   R   R   R   R   R*   R   (   R   R   Rw   R¥   Rš   R=   R>   R4   R   R   R   R(   R]   R_   Rf   Ro   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_norecurse¸   s*       l   
	 	      Ó   c         C   sm  g  } x- | j  d ƒ D] } | j | j | ƒ ƒ q Wt | ƒ } | sõ t j d ƒ d i d t j ƒ  k s| t j t ƒ r‹ t j	 t ƒ n d d 6d t j ƒ  k s³ t j | ƒ rÂ t j	 | ƒ n d d 6t j	 | ƒ d 6} t
 t j | ƒ ƒ ‚ n  d  } d	 } | | k } | s¨t j d | f d | | f ƒ i t j	 | ƒ d 6d t j ƒ  k set j | ƒ rtt j	 | ƒ n d d 6} d i | d 6} t
 t j | ƒ ƒ ‚ n  d  } } d } | | k } | s_t j d | f d | | f ƒ i t j	 | ƒ d 6d t j ƒ  k st j | ƒ r+t j	 | ƒ n d d 6} d i | d 6} t
 t j | ƒ ƒ ‚ n  d  } } d  S(   Ns   *diri   s.   
>assert %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
}R˜   R   Rw   R™   R%   R   RE   s   %(py1)s in %(py3)sR   s   assert %(py5)sR8   t   otherdir(   RE   (   s   %(py1)s in %(py3)ss   assert %(py5)s(   RE   (   s   %(py1)s in %(py3)ss   assert %(py5)s(   R£   R¤   R{   R˜   R   RP   R
   R   R   R   R   R   R   R	   (   R   R   Rw   R¥   R=   R>   Rš   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_filterfunc_is_string¿   s,      •     l   
   l   c         C   sÝ  | j  d ƒ } | j } t j } | j } | d | ƒ } t | ƒ } g  } | | k }	 |	 r»t j d f |	 f d f | | f ƒ i	 t j | ƒ d 6d t	 j
 ƒ  k p³ t j t ƒ rÅ t j t ƒ n d d 6d t	 j
 ƒ  k pê t j | ƒ rü t j | ƒ n d d	 6t j | ƒ d
 6t j | ƒ d 6d t	 j
 ƒ  k pAt j t ƒ rSt j t ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 d d i |
 d 6} t t j | ƒ ƒ ‚ n  t } } } } } }	 } d  S(   Nt   nonexistingt   ignores   ==s¬   %(py12)s
{%(py12)s = %(py0)s(%(py10)s
{%(py10)s = %(py3)s
{%(py3)s = %(py1)s.visit
}(ignore=%(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py4)s.error
}.ENOENT
})
})
} == %(py15)sR   RG   R   R   R™   R[   R%   R’   R   R   Ry   RY   R   s   assert %(py17)sRz   (   R   R£   R’   R•   t   ENOENTRG   R   R	   R   R
   R   R   R   R   R   (   R   R   R   R=   R   R(   R]   R^   R€   R_   R   R‚   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_ignoreÇ   s    	 	 	      ÿ 1   c         C   sB  g  } x0 | j  d „  ƒ D] } | j | j | ƒ ƒ q W| j } | j } d d g } | | ƒ } | | k } | sqt j d | f d | | f ƒ i t j | ƒ d 6d t j	 ƒ  k sÇ t j
 | ƒ rÖ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6d t j	 ƒ  k s.t j
 | ƒ r=t j | ƒ n d d 6}	 d i |	 d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } } d } | | k } | s4t j d | f d | | f ƒ i t j | ƒ d 6d t j	 ƒ  k sñt j
 | ƒ r t j | ƒ n d d 6} d i | d 6} t t j | ƒ ƒ ‚ n  d  } } d  S(   Nc         S   s   |  j  d d ƒ S(   NR&   t   file(   R0   (   R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyR   Î   s    R   R6   RE   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)sR   R   R   R   R   R   Rw   R[   R   s   assert %(py12)sRY   Rc   s   %(py1)s in %(py3)sR™   R%   s   assert %(py5)sR8   (   RE   (   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)ss   assert %(py12)s(   RE   (   s   %(py1)s in %(py3)ss   assert %(py5)s(   R£   R¤   R{   R*   R   R   R	   R   R
   R   R   R   R   R   (   R   R   Rw   R¥   R   R   R   R(   R]   Rf   Rg   Rš   R=   R>   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_endswithÌ   s(    	 	     Ó      l   c         C   s‘  | j  } d } | d | ƒ } | s± d d i d t j ƒ  k sO t j | ƒ r^ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } } | j	 d
 ƒ } | j  } d } | d | ƒ } | sd d i d t j ƒ  k st j | ƒ r,t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(   Ns   .pyt   notendswithR   sS   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(notendswith=%(py4)s)
}R   R   R   R   R   Rc   R®   R&   sP   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(endswith=%(py4)s)
}R@   (
   R0   R
   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R    R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_endswith_checkÓ   s    	    u  	    u  c         C   s  | j  d ƒ } | j  d ƒ } | | k  } d } d } | | k  } | | k } | sˆt j d | f d | | f ƒ i d t j ƒ  k s– t j | ƒ r¥ t j | ƒ n d d 6d t j ƒ  k sÍ t j | ƒ rÜ t j | ƒ n d d 6} t j d | f d | | f ƒ i t j | ƒ d
 6t j | ƒ d 6}	 t j d | f d | | f ƒ i |	 d 6| d 6}
 d i |
 d 6} t t j | ƒ ƒ ‚ n  d  } } } } } | | k  } | } | sst j d | f d | | f ƒ i d t j ƒ  k sùt j | ƒ rt j | ƒ n d d 6d t j ƒ  k s0t j | ƒ r?t j | ƒ n d d 6} d i | d 6} t t j | ƒ ƒ ‚ n  d  } } d  S(   NRc   Rd   t   <s   %(py0)s < %(py2)sR   R   t   path2R   s   %(py7)s < %(py10)sR[   RF   s   ==s   (%(py4)s) == (%(py12)s)RY   R   R   s   assert %(py14)sRZ   s   assert not %(py4)s(   R²   (   s   %(py0)s < %(py2)s(   R²   (   s   %(py7)s < %(py10)s(   s   ==(   s   (%(py4)s) == (%(py12)s)s   assert %(py14)s(   R²   (   s   %(py0)s < %(py2)ss   assert not %(py4)s(
   R   R   R	   R
   R   R   R   R   R   R   (   R   R   R³   R   RT   R]   R}   R   R   Rf   Rg   R`   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_cmpØ   s*          “ E 3      “   c         C   sÓ   | j  d ƒ j d ƒ } d } | | k } | sÅ t j d | f d | | f ƒ i d t j ƒ  k sr t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   NRc   t   rs   samplefile
s   ==s   %(py0)s == %(py3)sR@   R   R%   R   s   assert %(py5)sR8   (   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   R   t   readR   R	   R
   R   R   R   R   R   R   (   R   R   R@   R=   R   R>   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_simple_readÞ   s       l   c         C   sø   | d d } | j  d d ƒ } | | k } | sî t j d | f d | | f ƒ i d t j ƒ  k st t j | ƒ rƒ t j | ƒ n d d 6d	 t j ƒ  k s« t j | ƒ rº t j | ƒ n d	 d
 6} d i | d 6} t t j | ƒ ƒ ‚ n  d  } d  S(   Ns
   /sampledirs   /test//R   R“   s   ==s   %(py0)s == %(py2)sR+   R   t   newpath2R   R   s   assert %(py4)sR   (   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(
   R   R   R	   R
   R   R   R   R   R   R   (   R   R   R+   R¸   R   R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_join_div_operatorâ   s      “   c   	      C   sƒ  | j  d ƒ } | j } d } | | k } | sÕ t j d | f d | | f ƒ i d t j ƒ  k sr t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } | j  d ƒ } | j } | } | sud	 d i d t j ƒ  k s3t j | ƒ rBt j | ƒ n d d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   Ns   sampledir.exts   .exts   ==s+   %(py2)s
{%(py2)s = %(py0)s.ext
} == %(py5)sR+   R   R   R8   R   s   assert %(py7)sRF   R   s+   assert not %(py2)s
{%(py2)s = %(py0)s.ext
}(   s   ==(   s+   %(py2)s
{%(py2)s = %(py0)s.ext
} == %(py5)ss   assert %(py7)s(   R   t   extR   R	   R
   R   R   R   R   R   R   (	   R   R   R+   R   RI   R   R4   RJ   R>   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_extç   s     	    |   	   U  c         C   sç   | j  d ƒ } | j } d } | | k } | sÕ t j d | f d | | f ƒ i d t j ƒ  k sr t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } d  S(   Ns   samplefile.pyRc   s   ==s4   %(py2)s
{%(py2)s = %(py0)s.purebasename
} == %(py5)sR+   R   R   R8   R   s   assert %(py7)sRF   (   s   ==(   s4   %(py2)s
{%(py2)s = %(py0)s.purebasename
} == %(py5)ss   assert %(py7)s(   R   t   purebasenameR   R	   R
   R   R   R   R   R   R   (   R   R   R+   R   RI   R   R4   RJ   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_purebasenameí   s    	    |   c         C   sƒ  | j  d ƒ } | j d ƒ \ } } } } t | ƒ } | j } | | ƒ }	 |	 sLd d i t j |	 ƒ d 6d t j ƒ  k sŒ t j t ƒ r› t j t ƒ n d d 6d t j ƒ  k sÃ t j | ƒ rÒ t j | ƒ n d d	 6t j | ƒ d
 6t j | ƒ d 6d t j ƒ  k st j | ƒ r)t j | ƒ n d d 6}
 t	 t j
 |
 ƒ ƒ ‚ n  d  } } }	 d } | | k } | st j d | f d | | f ƒ i d t j ƒ  k s´t j | ƒ rÃt j | ƒ n d d 6t j | ƒ d
 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } d } | | k } | s¾t j d | f d | | f ƒ i d t j ƒ  k skt j | ƒ rzt j | ƒ n d d 6t j | ƒ d
 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } d } | | k } | sut j d | f d | | f ƒ i d t j ƒ  k s"t j | ƒ r1t j | ƒ n d d 6t j | ƒ d
 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } d  S(   Ns   samplefile.pys!   dirname,purebasename,basename,extR   sh   assert %(py8)s
{%(py8)s = %(py5)s
{%(py5)s = %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
}.endswith
}(%(py6)s)
}R   R$   R   R   R™   R%   R8   RS   R   Rc   s   ==s   %(py0)s == %(py3)sR¼   s   assert %(py5)sRL   s   .pyRº   (   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   R   t
   _getbyspecR$   R&   R   R   R
   R   R   R   R   R   R	   (   R   R   R+   RS   R¼   RL   Rº   R=   RI   R(   R!   R   R>   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_multiple_partsñ   s>     	   ã     l   
   l   
   l   c         C   s§  | j  d ƒ } | j } d } | | k } | sÅ t j d | f d | | f ƒ i d t j ƒ  k sr t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6} d i | d
 6} t t j	 | ƒ ƒ ‚ n  d  } } | j } d } | | k }	 |	 s•t j d |	 f d | | f ƒ i d t j ƒ  k s2t j | ƒ rAt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d
 6} d i | d 6}
 t t j	 |
 ƒ ƒ ‚ n  d  } }	 } d  S(   Ns   a.b.cs   .cs   ==s   %(py0)s == %(py3)sRº   R   R%   R   s   assert %(py5)sR8   s+   %(py2)s
{%(py2)s = %(py0)s.ext
} == %(py5)sR+   R   s   assert %(py7)sRF   (   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   s   ==(   s+   %(py2)s
{%(py2)s = %(py0)s.ext
} == %(py5)ss   assert %(py7)s(   R   Rº   R   R	   R
   R   R   R   R   R   R   (   R   R   R+   Rº   R=   R   R>   R4   RI   R   RJ   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_dotted_name_extú   s"    	   l   
	    |   c   	      C   sÍ  | j  d ƒ } | j d d ƒ } | j } d } | | k } | sç t j d | f d | | f ƒ i d t j ƒ  k s„ t j | ƒ r“ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } | j } d } | | k } | s»t j d | f d | | f ƒ i d t j ƒ  k sXt j | ƒ rgt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } d  S(   Ns   samplefile.pyRº   s   .txts   samplefile.txts   ==s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)st   newextR   R   R8   R   s   assert %(py7)sRF   Rc   s4   %(py2)s
{%(py2)s = %(py0)s.purebasename
} == %(py5)s(   s   ==(   s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)ss   assert %(py7)s(   s   ==(   s4   %(py2)s
{%(py2)s = %(py0)s.purebasename
} == %(py5)ss   assert %(py7)s(   R   R   RL   R   R	   R
   R   R   R   R   R   R   R¼   (	   R   R   R+   RÁ   R   RI   R   R4   RJ   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_newext   s$    	    |   	    |   c         C   sÙ   | j  d ƒ } | j ƒ  } d g } | | k } | sË t j d | f d | | f ƒ i d t j ƒ  k sx t j | ƒ r‡ t j | ƒ n d d 6t j | ƒ d 6} d i | d
 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   NRc   s   samplefile
s   ==s   %(py0)s == %(py3)st   contentsR   R%   R   s   assert %(py5)sR8   (   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   R   t	   readlinesR   R	   R
   R   R   R   R   R   R   (   R   R   t   fnRÃ   R=   R   R>   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_readlines  s    	   l   c         C   sâ   | j  d ƒ } | j d d ƒ } d d g } | | k } | sÔ t j d | f d | | f ƒ i d t j ƒ  k s t j | ƒ r t j | ƒ n d d 6t j | ƒ d	 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   NRc   t   cri    R   s   ==s   %(py0)s == %(py3)sRÃ   R   R%   s   assert %(py5)sR8   (   s   ==(   s   %(py0)s == %(py3)ss   assert %(py5)s(   R   RÄ   R   R	   R
   R   R   R   R   R   R   (   R   R   RÅ   RÃ   R=   R   R>   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_readlines_nocr  s       l   c   	      C   s  | j  } d } | | ƒ } | j } d } | d | ƒ } | sü d d i t j | ƒ d 6d t j ƒ  k sz t j | ƒ r‰ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } d  S(   NRc   i   R®   R   s‡   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(file=%(py10)s)
}R   R   R   R   R   R   RY   R[   (
   R   R0   R   R   R
   R   R   R   R   R   (	   R   R   R   R   R   R(   R]   R^   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt	   test_file  s    	   	    ¥  c         C   s;  | j  } d } | | ƒ } | j } d } | d | ƒ } | } | sd d i t j | ƒ d 6d t j ƒ  k s t j | ƒ r t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}	 t t j |	 ƒ ƒ ‚ n  d  } } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | sd d i t j | ƒ d 6d t j ƒ  k s›t j | ƒ rªt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } } } d  S(   NR   i   R®   R   s‹   assert not %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(file=%(py10)s)
}R   R   R   R   R   R   RY   R[   i    s‡   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(file=%(py10)s)
}(
   R   R0   R   R   R
   R   R   R   R   R   (   R   R   R   R   R   R(   R]   R^   R_   Ro   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_not_file  s*    	   	     ¥  	   	    ¥  c         C   s“  | j  } d } | | ƒ } | j } d } | d | ƒ } | sü d d i t j | ƒ d 6d t j ƒ  k sz t j | ƒ r‰ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | sd d i t j | ƒ d 6d t j ƒ  k st j | ƒ rŸt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | s(d d i t j | ƒ d 6d t j ƒ  k s¦t j | ƒ rµt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | s>d d i t j | ƒ d 6d t j ƒ  k s¼t j | ƒ rËt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | sTd d i t j | ƒ d 6d t j ƒ  k sÒt j | ƒ rát j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } } } } | j  } d } | | ƒ } | j } d } | d | ƒ } | }	 |	 sqd d i t j | ƒ d 6d t j ƒ  k sït j | ƒ rþt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } } } }	 d  S(   Ns   sampledir.notherei    R/   R   s†   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(dir=%(py10)s)
}R   R   R   R   R   R   RY   R[   R®   s‡   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(file=%(py10)s)
}i   t   notfilesŠ   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(notfile=%(py10)s)
}Rm   s‰   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(notdir=%(py10)s)
}t	   notexistssŒ   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(notexists=%(py10)s)
}sŽ   assert not %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(notfile=%(py10)s)
}(
   R   R0   R   R   R
   R   R   R   R   R   (   R   R   R   R   R   R(   R]   R^   Rg   R_   Ro   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_non_existent  sz    	   	    ¥  	   	    ¥  	   	    ¥  	   	    ¥  	   	    ¥  	   	     ¥  c   
      C   s[  | j  d ƒ } | j } | ƒ  } d } t | ƒ } | | k } | sAt j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s— t j | ƒ r¦ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6d	 t j ƒ  k sî t j t ƒ rý t j t ƒ n d	 d
 6t j | ƒ d 6} d i | d 6}	 t	 t j
 |	 ƒ ƒ ‚ n  d  } } } } } d  S(   NRc   t   >sb   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.size
}()
} > %(py10)s
{%(py10)s = %(py6)s(%(py8)s)
}R   t   urlR   R   R   R˜   R   R[   R   s   assert %(py12)sRY   (   RÎ   (   sb   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.size
}()
} > %(py10)s
{%(py10)s = %(py6)s(%(py8)s)
}s   assert %(py12)s(   R   t   sizeR˜   R   R	   R   R
   R   R   R   R   R   (
   R   R   RÏ   R   R   R(   R]   R   Rf   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt	   test_size#  s    	 	     Ó   c   	      C   s  | j  d ƒ } | j } | ƒ  } d } | | k } | sî t j d | f d | | f ƒ i d t j ƒ  k s{ t j | ƒ rŠ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d	 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } d  S(   NRc   i    RÎ   sC   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.mtime
}()
} > %(py7)sRÏ   R   R   R   RF   R   s   assert %(py9)sRR   (   RÎ   (   sC   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.mtime
}()
} > %(py7)ss   assert %(py9)s(   R   t   mtimeR   R	   R
   R   R   R   R   R   R   (	   R   R   RÏ   R   R   RT   R   RJ   RU   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt
   test_mtime'  s    	 	    Œ   c         C   s   t  j j t d ƒ d  S(   Ns   path1.relto(42)(   R’   R“   R”   t	   TypeError(   R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_relto_wrong_type+  s    c         C   s’  | j  d ƒ } | j ƒ  } t | ƒ } | t k } | s<t j d | f d | t f ƒ i d t j ƒ  k s{ t j t ƒ rŠ t j	 t ƒ n d d 6d t j ƒ  k s² t j | ƒ rÁ t j	 | ƒ n d d 6t j	 | ƒ d 6d	 t j ƒ  k sù t j t ƒ rt j	 t ƒ n d	 d
 6} d i | d 6} t
 t j | ƒ ƒ ‚ n  d  } } | j } d }	 | |	 d  ƒ }
 d } |
 | k } | sxt j d | f d |
 | f ƒ i d t j ƒ  k s¾t j | ƒ rÍt j	 | ƒ n d d 6t j	 | ƒ d 6t j	 |	 ƒ d 6d t j ƒ  k st j d  ƒ r$t j	 d  ƒ n d d
 6t j	 |
 ƒ d 6t j	 | ƒ d 6} d i | d 6} t
 t j | ƒ ƒ ‚ n  d  } }	 }
 } } d  S(   NR¡   t   iss0   %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} is %(py5)st   typeR   t   objR™   R%   t   dictR8   R   s   assert %(py7)sRF   t   answeri*   s   ==sS   %(py7)s
{%(py7)s = %(py2)s
{%(py2)s = %(py0)s.get
}(%(py4)s, %(py5)s)
} == %(py10)sR   R   R   R[   s   assert %(py12)sRY   (   RÖ   (   s0   %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} is %(py5)ss   assert %(py7)s(   s   ==(   sS   %(py7)s
{%(py7)s = %(py2)s
{%(py2)s = %(py0)s.get
}(%(py4)s, %(py5)s)
} == %(py10)ss   assert %(py12)s(   R   t   loadR×   RÙ   R   R	   R
   R   R   R   R   R   R   t   get(   R   R   R   RØ   R=   RI   R4   RJ   R   R   RT   R]   R}   Rf   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt	   test_load.  s&       Ú   
	      Ó   c         C   sB  g  } x0 | j  d „  ƒ D] } | j | j | ƒ ƒ q Wd } | | k } | sæ t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s£ t j | ƒ r² t j | ƒ n d d 6} d i | d
 6} t	 t j
 | ƒ ƒ ‚ n  d  } } | j } | j }	 d d g }
 |	 |
 ƒ } | | k } | s(t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s~t j | ƒ rt j | ƒ n d d 6t j | ƒ d 6t j |	 ƒ d 6t j |
 ƒ d 6d t j ƒ  k såt j | ƒ rôt j | ƒ n d d 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } }	 }
 } } d  S(   Nc         S   s   |  j  d d ƒ S(   NR®   i   (   R0   (   R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyR   6  s    R   s   not ins   %(py1)s not in %(py3)sR™   Rw   R%   R   s   assert %(py5)sR8   R6   RE   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)sR   R   R   R   R   R   R[   s   assert %(py12)sRY   (   s   not in(   s   %(py1)s not in %(py3)ss   assert %(py5)s(   RE   (   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)ss   assert %(py12)s(   R£   R¤   R{   R   R	   R   R
   R   R   R   R   R   R*   R   (   R   R   Rw   R¥   Rš   R=   R>   R4   R   R   R   R(   R]   Rf   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_filesonly4  s(       l   
	 	     Ó   c         C   sù  g  } x0 | j  d „  ƒ D] } | j | j | ƒ ƒ q Wd } | | k } | sæ t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s£ t j | ƒ r² t j | ƒ n d d 6} d i | d
 6} t	 t j
 | ƒ ƒ ‚ n  d  } } | j } | j }	 d d g }
 |	 |
 ƒ } | | k } | s(t j d | f d | | f ƒ i t j | ƒ d 6d t j ƒ  k s~t j | ƒ rt j | ƒ n d d 6t j | ƒ d 6t j |	 ƒ d 6t j |
 ƒ d 6d t j ƒ  k såt j | ƒ rôt j | ƒ n d d 6} d i | d 6} t	 t j
 | ƒ ƒ ‚ n  d  } }	 }
 } } d } | | k } | sët j d | f d  | | f ƒ i t j | ƒ d 6d t j ƒ  k s¨t j | ƒ r·t j | ƒ n d d 6} d! i | d
 6} t	 t j
 | ƒ ƒ ‚ n  d  } } d  S("   Nc         S   s   |  j  d d ƒ S(   Nt   dotfilei    (   R0   (   R@   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyR   =  s    R   RE   s   %(py1)s in %(py3)sR™   Rw   R%   R   s   assert %(py5)sR8   R6   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)sR   R   R   R   R   R   R[   s   assert %(py12)sRY   s   .dotfiles   not ins   %(py1)s not in %(py3)s(   RE   (   s   %(py1)s in %(py3)ss   assert %(py5)s(   RE   (   sd   %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.sep
}.join
}(%(py6)s)
} in %(py10)ss   assert %(py12)s(   s   not in(   s   %(py1)s not in %(py3)ss   assert %(py5)s(   R£   R¤   R{   R   R	   R   R
   R   R   R   R   R   R*   R   (   R   R   Rw   R¥   Rš   R=   R>   R4   R   R   R   R(   R]   Rf   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_nodotfiles;  s6       l   
	 	     Ó      l   c         C   su  g  } x0 | j  d t ƒ D] } | j | j | ƒ ƒ q Wx5t | ƒ D]\ } } | j | k rF xõ t | t | ƒ ƒ D]Þ } | j } | | } | | k } | sGt j	 d | f d | | f ƒ i d t
 j ƒ  k sä t j | ƒ ró t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6}	 d i |	 d
 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } qw WPqF qF Wt j j d ƒ d  S(   Nt   bfRE   s+   %(py2)s
{%(py2)s = %(py0)s.sep
} in %(py5)sR   R   R   R8   R   s   assert %(py7)sRF   t   huh(   RE   (   s+   %(py2)s
{%(py2)s = %(py0)s.sep
} in %(py5)ss   assert %(py7)s(   R£   R<   R¤   R{   t	   enumerateR*   t   rangeR˜   R   R	   R
   R   R   R   R   R   R   R’   R“   t   fail(   R   R   Rw   R¥   R   t   jR   RI   R   R4   RJ   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_breadthfirstC  s     	 
   |   c         C   se  g  } x6 | j  d t d t ƒ D] } | j | j | ƒ ƒ q Wx- t | ƒ D] \ } } | j | k rL PqL qL W| |  } | |  } t | ƒ } | | k } | sVt j d | f d | | f ƒ i t j	 | ƒ d 6d t
 j ƒ  k só t j t ƒ rt j	 t ƒ n d d 6t j	 | ƒ d 6t j	 | ƒ d	 6}	 d i |	 d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } | | } | | } t | ƒ } | | k } | sOt j d | f d | | f ƒ i t j	 | ƒ d 6d t
 j ƒ  k sìt j t ƒ rût j	 t ƒ n d d 6t j	 | ƒ d 6t j	 | ƒ d	 6}	 d i |	 d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } d  S(   NRá   R    s   ==s0   %(py1)s == %(py7)s
{%(py7)s = %(py3)s(%(py5)s)
}R™   t   sortedR%   R8   RF   R   s   assert %(py9)sRR   (   s   ==(   s0   %(py1)s == %(py7)s
{%(py7)s = %(py3)s(%(py5)s)
}s   assert %(py9)s(   s   ==(   s0   %(py1)s == %(py7)s
{%(py7)s = %(py3)s(%(py5)s)
}s   assert %(py9)s(   R£   R<   R¤   R{   Rã   R*   Rè   R   R	   R   R
   R   R   R   R   R   (   R   R   Rw   R¥   R   Rš   RI   RT   R=   RJ   RU   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_visit_sortO  s0    
 
    Œ   
 
    Œ   c         C   s  d „  } | | ƒ } | } | sÆ d d i d t  j ƒ  k sM t j | ƒ r\ t j | ƒ n d d 6d t  j ƒ  k s„ t j | ƒ r“ t j | ƒ n d d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } | j } d	 } | | ƒ } | | ƒ } | } | sØd d
 i t j | ƒ d 6d t  j ƒ  k s?t j | ƒ rNt j | ƒ n d d 6d t  j ƒ  k svt j | ƒ r…t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}	 t t j |	 ƒ ƒ ‚ n  d  } } } } } | j } d } | | ƒ } | | ƒ } | sïd d i t j | ƒ d 6d t  j ƒ  k sVt j | ƒ ret j | ƒ n d d 6d t  j ƒ  k st j | ƒ rœt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6}
 t t j |
 ƒ ƒ ‚ n  d  } } } } d  S(   Nc         S   s   |  j  d d ƒ S(   NR&   t   pickle(   R0   (   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   chkZ  s    R   s0   assert not %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
}Rë   R   R   R™   R%   Rc   sh   assert not %(py9)s
{%(py9)s = %(py0)s(%(py7)s
{%(py7)s = %(py3)s
{%(py3)s = %(py1)s.join
}(%(py5)s)
})
}RR   R8   RF   t
   somepicklesd   assert %(py9)s
{%(py9)s = %(py0)s(%(py7)s
{%(py7)s = %(py3)s
{%(py3)s = %(py1)s.join
}(%(py5)s)
})
}(	   R
   R   R   R   R   R   R   R   R   (   R   R   Rë   R=   RI   R   RT   R}   R~   Rf   RU   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_endswithY  s0    	   Œ  
	      ¼  	     ¼  c         C   sê  | j  d ƒ } | j  d ƒ } | j  d ƒ } | j | ƒ z| j } | ƒ  } | sÒ d d i d t j ƒ  k s€ t j | ƒ r t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } | j ƒ  } | j ƒ  }	 | |	 k } | sÂt j d | f d | |	 f ƒ i d t j ƒ  k sHt j | ƒ rWt j | ƒ n d d 6d t j ƒ  k st j |	 ƒ rŽt j |	 ƒ n d d 6}
 d i |
 d 6} t t j	 | ƒ ƒ ‚ n  d  } Wd  | j ƒ  rå| j ƒ  n  Xd  S(   NR¨   s   __init__.pyt   copiedR   s@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}R   R   R   s   ==s   %(py0)s == %(py2)st   s1t   s2s   assert %(py4)s(   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(   R   t   copyR0   R
   R   R   R   R   R   R   R   R¶   R	   t   remove(   R   R   R¨   t   initpyRî   R   R   R   Rï   Rð   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_copy_file`  s*    	 	  e  
  “   
c         C   s/  | j  d ƒ } | j  d ƒ } zä| j | ƒ | j } d } | d | ƒ } | sß d d i d t j ƒ  k s} t j | ƒ rŒ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } | j  } d } | | ƒ } | j } d }	 | d |	 ƒ }
 |
 séd d i t j | ƒ d 6d t j ƒ  k sgt j | ƒ rvt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j |
 ƒ d 6t j |	 ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } }	 }
 | j  d ƒ j ƒ  } | j  d ƒ j ƒ  } | | k } | sût j d | f d | | f ƒ i d t j ƒ  k st j | ƒ rt j | ƒ n d d 6d t j ƒ  k s¸t j | ƒ rÇt j | ƒ n d d	 6} d i | d
 6} t t j	 | ƒ ƒ ‚ n  d  } Wd  | j d d ƒ r*| j d d ƒ n  Xd  S(   NR¨   t   newdiri   R/   R   sK   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(dir=%(py4)s)
}Rî   R   R   R   R   s   __init__.pyR®   s‡   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(file=%(py10)s)
}R   RY   R[   s   ==s   %(py0)s == %(py2)sRï   Rð   s   assert %(py4)st   rec(   s   ==(   s   %(py0)s == %(py2)ss   assert %(py4)s(   R   Rñ   R0   R
   R   R   R   R   R   R   R   R¶   R	   Rò   (   R   R   R¨   Rî   R   R   R   R    R(   R]   R^   Rg   Rï   Rð   R   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_copy_dirn  s>    	    u  	   	    ¥    “   
c         C   sf  | j  d ƒ } | j } | ƒ  } | s¤ d d i d t j ƒ  k sR t j | ƒ ra t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } | j
 ƒ  | j } | ƒ  } | } | sTd d i d t j ƒ  k st j | ƒ rt j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(	   Nt	   todeletedR   s@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}t   dR   R   R   sD   assert not %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}(   t   ensureR0   R
   R   R   R   R   R   R   R   Rò   (   R   R   Rù   R   R   R   R   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_remove_file|  s    	 	  e  

	 	   e  c   	      C   s{  | j  d d d ƒ } | j } | ƒ  } | sª d d i d t j ƒ  k sX t j | ƒ rg t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } | j
 d ƒ } | j ƒ  | j } | ƒ  } | } | sid d
 i d t j ƒ  k st j | ƒ r&t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d	 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(   Nt   tot   bet   deletedR   s@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}Rù   R   R   R   sD   assert not %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}R   (   Rú   R0   R
   R   R   R   R   R   R   R   R   Rò   (	   R   R   Rù   R   R   R   R   R   R4   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt$   test_remove_dir_recursive_by_default‚  s     	 	  e  

	 	   e  c   	      C   s‰  | j  d d ƒ } | j } d } | | k } | sØ t j d | f d | | f ƒ i d t j ƒ  k su t j | ƒ r„ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } | j } | ƒ  } | s{d	 d i d t j ƒ  k s)t j | ƒ r8t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } d  S(   Nt   001t   002s   ==s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)sR   R   R   R8   R   s   assert %(py7)sRF   s@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.isdir
}()
}R   (   s   ==(   s0   %(py2)s
{%(py2)s = %(py0)s.basename
} == %(py5)ss   assert %(py7)s(   t
   ensure_dirRL   R   R	   R
   R   R   R   R   R   R   R2   (	   R   R   R   R   RI   R   R4   RJ   R   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_ensure_dir‰  s    	    |   	 	  e  c         C   s  | } t  j j t  j j | j d ƒ | j d ƒ } | j ƒ  | j } d } | d | ƒ } | sï d d i d t j	 ƒ  k s t
 j | ƒ rœ t
 j | ƒ n d d 6t
 j | ƒ d	 6t
 j | ƒ d
 6t
 j | ƒ d 6} t t
 j | ƒ ƒ ‚ n  d  } } } | j ƒ  | j d ƒ } | j } d } | d | ƒ } | sÇd d i d t j	 ƒ  k set
 j | ƒ rtt
 j | ƒ n d d 6t
 j | ƒ d	 6t
 j | ƒ d
 6t
 j | ƒ d 6} t t
 j | ƒ ƒ ‚ n  d  } } } | j ƒ  | j } d } | | ƒ } | | k } | søt
 j d | f d | | f ƒ i d t j	 ƒ  k sNt
 j | ƒ r]t
 j | ƒ n d d 6d t j	 ƒ  k s…t
 j | ƒ r”t
 j | ƒ n d d 6t
 j | ƒ d	 6t
 j | ƒ d
 6t
 j | ƒ d 6}	 d i |	 d 6}
 t t
 j |
 ƒ ƒ ‚ n  d  } } } } d  S(   NR   t   mktest1i   R/   R   sK   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(dir=%(py4)s)
}R   R   R   R   R   t   mktests   ==sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} == %(py8)st   tmpdirR   s   assert %(py10)sR[   (   s   ==(   sJ   %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
} == %(py8)ss   assert %(py10)s(   R’   R“   R”   R•   t   EEXISTt   mkdirR   R0   R
   R   R   R   R   R   R   R   Rò   R	   (   R   R   R  R   R   R   R   R    R(   R!   Rf   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_mkdir_and_removeŽ  s<    
	    u  
	    u  
	     Ã   c         C   st  | j  d ƒ } | j d ƒ } | j | ƒ zm| j } d } | d | ƒ } | sß d d i d t j ƒ  k s} t j | ƒ rŒ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } | j } | ƒ  } | } | s‰d d i d t j ƒ  k s7t j | ƒ rFt j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6} t	 t j
 | ƒ ƒ ‚ n  d  } } } Wd  | j ƒ  }	 t |	 d ƒ rÃ|	 j ƒ  n¬ | j | ƒ | j } | ƒ  } | sed d i d t j ƒ  k st j | ƒ r"t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6}
 t	 t j
 |
 ƒ ƒ ‚ n  d  } } Xd  S(   NRc   t   moved_samplefilei   R®   R   sL   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(file=%(py4)s)
}t   newpR   R   R   R   sD   assert not %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}R   t   reverts@   assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.check
}()
}(   R   RW   t   moveR0   R
   R   R   R   R   R   R   R   t   hasattrR  (   R   R   R   R  R   R   R   R    R4   t   dpR   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_move_file›  s8    	    u  	 	   e  	 	  e  c         C   s  | j  d ƒ } | j  d ƒ } | j | ƒ | j } d } | d | ƒ } | sÜ d d i d t j ƒ  k sz t j | ƒ r‰ t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } | j  } d } | | ƒ } | j } d }	 | d |	 ƒ }
 |
 sæd d i t j | ƒ d 6d t j ƒ  k sdt j | ƒ rst j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j |
 ƒ d 6t j |	 ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } }	 }
 | j  } d } | | ƒ } | j } | ƒ  }	 |	 }
 |
 sçd d i t j | ƒ d 6d t j ƒ  k sut j | ƒ r„t j | ƒ n d d 6t j | ƒ d	 6t j | ƒ d
 6t j | ƒ d 6t j |	 ƒ d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } }	 }
 d  S(   NR   t   moveddiri   R/   R   sK   assert %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.check
}(dir=%(py4)s)
}t   destR   R   R   R   R6   R®   s‡   assert %(py12)s
{%(py12)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}(file=%(py10)s)
}R   RY   R[   s~   assert not %(py10)s
{%(py10)s = %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.join
}(%(py4)s)
}.check
}()
}t   source(   R   R  R0   R
   R   R   R   R   R   R   R   (   R   R   R  R  R   R   R   R    R(   R]   R^   Rg   Rj   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_move_dirª  s<    	    u  	   	    ¥  	   	 	   •  c         C   s/  | j  } | ƒ  } | j } | | k } | st j d | f d | | f ƒ i d t j ƒ  k so t j | ƒ r~ t j | ƒ n d d 6t j | ƒ d 6t j | ƒ d 6t j | ƒ d 6d t j ƒ  k sÖ t j | ƒ rå t j | ƒ n d d 6} d i | d 6} t t j	 | ƒ ƒ ‚ n  d  } } } } d  S(   Ns   ==sf   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.__fspath__
}()
} == %(py8)s
{%(py8)s = %(py6)s.strpath
}R   R   R   R   R   R   R   s   assert %(py10)sR[   (   s   ==(   sf   %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.__fspath__
}()
} == %(py8)s
{%(py8)s = %(py6)s.strpath
}s   assert %(py10)s(   t
   __fspath__t   strpathR   R	   R
   R   R   R   R   R   R   (   R   R   R   R   R(   R   R!   Rf   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt"   test_fspath_protocol_match_strpath²  s    	 	 	   Ã   c         C   s„  y d d l  m } Wn! t k
 r7 d d l m } n X| | ƒ } | j } | | k } | srt j d | f d | | f ƒ i d t j ƒ  k s¡ t j	 | ƒ r° t j
 | ƒ n d d 6d t j ƒ  k sØ t j	 | ƒ rç t j
 | ƒ n d d 6t j
 | ƒ d	 6d t j ƒ  k st j	 | ƒ r.t j
 | ƒ n d d
 6t j
 | ƒ d 6} d i | d 6} t t j | ƒ ƒ ‚ n  d  } } } d  S(   Niÿÿÿÿ(   t   fspaths   ==sM   %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py7)s
{%(py7)s = %(py5)s.strpath
}R  R   R   R™   R%   R8   RF   R   s   assert %(py9)sRR   (   s   ==(   sM   %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py7)s
{%(py7)s = %(py5)s.strpath
}s   assert %(py9)s(   t   osR  t   ImportErrort   py._path.commonR  R   R	   R
   R   R   R   R   R   R   (   R   R   R  R=   RT   RI   RJ   RU   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_fspath_func_match_strpathµ  s     	   ê   s   sys.version_info < (3,6)c         C   s   | j  d ƒ } t | ƒ d  S(   Nt   opentestfile(   R   t   open(   R   R   t   f(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_fspath_open¼  s    c   	      C   s¾  d d l  m } | | ƒ } | j } | | ƒ } | | k } | r¨t j d f | f d f | | f ƒ i t j | ƒ d 6d t j ƒ  k p™ t j | ƒ r« t j | ƒ n d d 6d t j ƒ  k pÐ t j | ƒ râ t j | ƒ n d d	 6t j | ƒ d
 6t j | ƒ d 6d t j ƒ  k p't j | ƒ r9t j | ƒ n d d 6d t j ƒ  k p^t j | ƒ rpt j | ƒ n d d 6} d d i | d 6} t	 t j
 | ƒ ƒ ‚ n  t } } } } d  S(   Niÿÿÿÿ(   t   fsencodes   ==sm   %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py10)s
{%(py10)s = %(py5)s(%(py8)s
{%(py8)s = %(py6)s.strpath
})
}R   R!  R   R   R™   R[   R%   R8   R   R   s   assert %(py12)sRY   (   R  R!  R  R   R	   R   R
   R   R   R   R   R   (	   R   R   R!  R=   R(   R]   RI   Rf   Rg   (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   test_fspath_fsencodeÁ  s     	    ÿ 8   (K   t   __name__t
   __module__R   R   R"   R)   R,   R-   R5   R?   RC   RK   RO   RQ   RV   RX   Rb   Rh   Rk   Rl   Rp   Rr   Ru   Rƒ   R‹   R   R’   R“   t   markt   xfailR—   Rœ   Rž   R¢   R¦   R§   R©   R­   R¯   R±   R´   R·   R¹   R»   R½   R¿   RÀ   RÂ   RÆ   RÈ   RÉ   RÊ   RÍ   RÑ   RÓ   RÕ   RÝ   RÞ   Rà   Rç   Ré   Rí   Rô   R÷   Rû   Rÿ   R  R	  R  R  R  R  t   skipR   R"  (    (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyR       sˆ   					
																																																		
											c         C   s  |  j  d ƒ j ƒ  r d  Sd |  f GH|  j d ƒ } | j d ƒ |  j d ƒ } | j d ƒ |  j d ƒ } | j d ƒ i d d 6d	 d
 6d d 6} |  j d ƒ j | ƒ |  j d d d ƒ} | j d ƒ |  j d d d ƒ} | j d ƒ | j d ƒ } t j d k r| j d ƒ n | j d ƒ | j d ƒ } | j d ƒ | j d ƒ }	 |	 j d ƒ | j d ƒ }
 |
 j d ƒ d  S(   NRc   s   setting up test fs for %rs   samplefile
t   execfiles   x=42s   execfile.pyi   i   R‡   R†   i*   RÚ   R¡   R   R/   R6   R¨   s   __init__.pys   a.pyi   s   from .b import stuff as result
s   from b import stuff as result
s   b.pys   stuff="got it"
s   c.pys7   import py;
import otherdir.a
value = otherdir.a.result
s   d.pys4   import py;
from otherdir import a
value2 = a.result
(   i   i   (   R   R0   Rú   t   writet   dumpt   syst   version_info(   t   pathRc   R(  t
   execfilepyRù   R   R¨   t   module_at   module_bt   module_ct   module_d(    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   setuptestfsÇ  s6    (   t   __builtin__R
   t   _pytest.assertion.rewritet	   assertiont   rewriteR   R’   R+  t   objectR    R3  (    (    (    s9   /home/ronny/Projects/pytest-dev/py/testing/path/common.pyt   <module>   s     ÿ Ã