ó
©Æ[c           @@ sË  d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z
 d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z e Z d „  Z e j d	 e  d
 e j g ƒ d „  ƒ Z! e j" d „ Z# d f  d „  ƒ  YZ$ d f  d „  ƒ  YZ% d f  d „  ƒ  YZ& d f  d „  ƒ  YZ' d f  d „  ƒ  YZ( d f  d „  ƒ  YZ) d f  d „  ƒ  YZ* d f  d „  ƒ  YZ+ d f  d „  ƒ  YZ, d f  d  „  ƒ  YZ- e j. j/ e j0 d! d" f k  d# d$ ƒd% f  d& „  ƒ  Yƒ Z1 d' f  d( „  ƒ  YZ2 d) f  d* „  ƒ  YZ3 e j. j4 d+ d# d, ƒd- „  ƒ Z5 d. „  Z6 d S(/   uC  
Tests for the path module.

This suite runs on Linux, OS X, and Windows right now.  To extend the
platform support, just add appropriate pathnames for your
platform (os.name) in each place where the p() function is called.
Then report the result.  If you can't get the test to run at all on
your platform, there's probably a bug in path.py -- please report the issue
in the issue tracker at https://github.com/jaraco/path.py.

TestScratchDir.test_touch() takes a while to run.  It sleeps a few
seconds to allow some time to pass between calls to check the modify
time on files.
i    (   t   unicode_literalst   absolute_importt   print_functionN(   t   TempDir(   t   matchers(   t   SpecialResolver(   t   Multic          K@ s   |  t  j S(   u?    Choose a value from several possible values, based on os.name (   t   ost   name(   t   choices(    (    s(   lib/python2.7/site-packages/test_path.pyt   p0   s    t   autouset   paramsc         C@ s   | j  t ƒ  d |  j ƒ d S(   u5   
    Invoke tests on any number of Path classes.
    u   PathN(   t   setitemt   globalst   param(   t   requestt   monkeypatch(    (    s(   lib/python2.7/site-packages/test_path.pyt
   path_class5   s    c         C@ sM   t  j j t j ƒ  d ƒ } t  j j |  ƒ } t j ƒ  d k oL | | | ƒ S(   uF   
    Return True if on a Mac whose version passes the comparator.
    i    u   Darwin(   t	   packagingt   versiont   parset   platformt   mac_vert   system(   t   targett
   comparatort   current_vert
   target_ver(    (    s(   lib/python2.7/site-packages/test_path.pyt   mac_version=   s    t
   TestBasicsc           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 RS(   c   	      C@ s  t  t d d d d ƒ ƒ } | d } | d } | d } | d d	 } t  t j ƒ } | j | ƒ t  d ƒ d d d	 k sƒ t ‚ | j | ƒ t  d ƒ d	 k s¨ t ‚ | j | ƒ | d d d	 k sÏ t ‚ | j | ƒ | | | d k sö t ‚ | j | ƒ | | k st ‚ | j | ƒ d t  d ƒ d d	 k sBt ‚ | j | ƒ t j k s`t ‚ | j | ƒ t j k s~t ‚ | j | j ƒ  ƒ t j k s¢t ‚ t  t j ƒ  ƒ } | j	 ƒ  | j | ƒ k sÕt ‚ t j
 d
 k rt  d ƒ } | j | ƒ | k st ‚ n  d  S(   Nt   ntu   C:\t   posixu   /u   foou   quuxu   baru   Bazu   Bozu   ntu   D:\(   t   PathR
   R   t   pardirt	   relpathtot   AssertionErrort   curdirt   normcaset   getcwdt   relpathR   (	   t   selft   roott   foot   quuxt   bart   bozt   upt   cwdt   d(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_relpathJ   s(    


-%''-$!c         C@ s2   y t  d ƒ Wn t k
 r! n Xt d ƒ ‚ d S(   u
   

        u   DID NOT RAISEN(   R!   t   Nonet	   TypeErrort	   Exception(   R)   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_construction_from_nonek   s
    c         C@ s   t  d ƒ d k s t ‚ d S(   uL   
        Path class will construct a path as a string of the number
        i   u   1N(   R!   R$   (   R)   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_construction_from_intv   s    c         C@ sÛ   t  d ƒ } | d k s t ‚ | t d ƒ k s6 t ‚ t  d ƒ t  d ƒ d t  d ƒ d t  d ƒ d g } | j ƒ  | d d d d d d d g k sš t ‚ t  d	 ƒ } t  d
 ƒ } | | t d d d d ƒ k s× t ‚ d S(   u+    Test compatibility with ordinary strings. u   xyzzyu   fhju   fghu   Eu   du   Au   Bu   cu   foou   barR   u   foo\barR    u   foo/barN(   R!   R$   t   strt   sortR
   (   R)   t   xt   itemst   p1t   p2(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_string_compatibility|   s    					
'c         C@ sè   t  d d d d ƒ } t | ƒ } d } d } t  d | d | ƒ } | j | k sW t ‚ | j d k sl t ‚ | j j t  d d d d	 ƒ k s“ t ‚ | j d
 k s¨ t ‚ | j j d k sÀ t ‚ | j t  d d d d ƒ k sä t ‚ d  S(   NR   u$   C:\Program Files\Python\Lib\xyzzy.pyR    u   /usr/local/python/lib/xyzzy.pyu   C:\Program Files\Python\Libu   /usr/local/python/libu   xyzzy.pyu   Libu   libu   .pyu    u   C:(   R
   R!   t   parentR$   R   t   extt   drive(   R)   t   ft   nt_libt	   posix_libt   expected(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_properties’   s    	'c         C@ sd   t  t j ƒ j ƒ  t j ƒ  k s' t ‚ t  j ƒ  } t | t  ƒ sH t ‚ | t j ƒ  k s` t ‚ d  S(   N(   R!   R   R%   t   abspathR'   R$   t
   isinstance(   R)   R0   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_methods©   s    'c         C@ sd   t  t j d ƒ r` t d ƒ } | j d k s3 t ‚ | j ƒ  t j j t | ƒ ƒ k s` t ‚ n  d  S(   Nu   splituncu   \\python1\share1\dir1\file1.txtu   \\python1\share1(   t   hasattrR   t   pathR!   t   uncshareR$   t   splituncR8   (   R)   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_UNC²   s    c         C@ s·   t  j t ƒ d ƒ } t  j t ƒ d ƒ } t  j t ƒ d ƒ } | j ƒ  d k sW t ‚ | j ƒ  d k so t ‚ | j ƒ  d k s‡ t ‚ | d d k s t ‚ | d d k s³ t ‚ d	 S(
   uF   
        The user may specify an explicit path module to use.
        u   foo\bar\bazu   foo/bar/bazu   foo\baru   foo/baru    u   quuxu   foo\bar\baz\quuxu   foo/bar/baz/quuxN(   R!   t   using_modulet   ntpatht	   posixpatht   dirnameR$   (   R)   t   nt_okt   posix_okt   posix_wrong(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_explicit_module¸   s    c         C@ sC   t  j t ƒ } | t  j t ƒ k s* t ‚ | j d k s? t ‚ d S(   uT   
        Multiple calls to path.using_module should produce the same class.
        u   Path_ntpathN(   R!   RO   RP   R$   t   __name__(   R)   t   nt_path(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_explicit_module_classesÇ   s    c         C@ s@   t  d ƒ } | j d ƒ } | t d d d d ƒ k s< t ‚ d  S(   Nu   foou   barR   u   foo\barR    u   foo/bar(   R!   t   joinpathR
   R$   (   R)   t   rest   foo_bar(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_joinpath_on_instanceÏ   s    c         C@ s(   t  d ƒ } | j ƒ  | k s$ t ‚ d  S(   Nu   foo(   R!   RZ   R$   (   R)   R[   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_joinpath_to_nothingÔ   s    c         C@ s7   t  j d d ƒ } | t d d d d ƒ k s3 t ‚ d S(   u)   Construct a path from a series of stringsu   foou   barR   u   foo\barR    u   foo/barN(   R!   RZ   R
   R$   (   R)   R\   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_joinpath_on_classØ   s    c         C@ s2   y t  j ƒ  Wn t k
 r! n Xt d ƒ ‚ d S(   u,   It doesn't make sense to join nothing at allu   did not raiseN(   R!   RZ   R4   R5   (   R)   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_joinpath_fails_on_emptyÝ   s
    c         C@ sm   t  j t ƒ } | j d ƒ } t | | ƒ s3 t ‚ | j d ƒ } t | | ƒ sW t ‚ | d k si t ‚ d  S(   Nu   foou   baru   foo/bar(   R!   RO   RQ   RZ   RH   R$   (   R)   t
   path_posixR[   t   res2(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_joinpath_returns_same_typeæ   s    (   RW   t
   __module__R2   R6   R7   R>   RF   RI   RN   RV   RY   R]   R^   R_   R`   Rc   (    (    (    s(   lib/python2.7/site-packages/test_path.pyR   I   s   	!														t   TestPerformancec           B@ s,   e  Z e j j e j d  d ƒd „  ƒ Z RS(   t   reasonu+   Tests fail frequently on Python 2; see #153c         C@ s‘   t  j d d d d d d d g } t j | d t ƒ} t j d | ƒ j d	 ƒ } t j	 d
 d ƒ } t j	 d
 t
 | ƒ ƒ } | | k  s t ‚ d S(   uˆ   
        Import of path.py should take less than 100ms.

        Run tests in a subprocess to isolate from test suite overhead.
        u   -mu   timeitu   -nu   1u   -ru   import patht   universal_newlinesu   (\d+) msec per loopi   t   millisecondsid   N(   t   syst
   executablet
   subprocesst   check_outputt   Truet   ret   searcht   groupt   datetimet	   timedeltat   intR$   (   R)   R   t   cmdR[   t   durt   limitt   duration(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_import_timeð   s    
	(   RW   Rd   t   pytestt   markt   skipifRK   t   PY2Rx   (    (    (    s(   lib/python2.7/site-packages/test_path.pyRe   ï   s   		t   TestSelfReturnc           B@ s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   uÄ   
    Some methods don't necessarily return any value (e.g. makedirs,
    makedirs_p, rename, mkdir, touch, chroot). These methods should return
    self anyhow to allow methods to be chained.
    c         C@ s2   t  | ƒ d } | j ƒ  } | | k s. t ‚ d S(   u9   
        Path('foo').makedirs_p() == Path('foo')
        u   newpathN(   R!   t
   makedirs_pR$   (   R)   t   tmpdirR
   t   ret(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_makedirs_p  s    c         C@ s.   t  | ƒ } | j ƒ  } | | k s* t ‚ d  S(   N(   R!   R~   R$   (   R)   R   R
   R€   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_makedirs_p_extant  s    c         C@ sO   t  | ƒ d } | j ƒ  t  | ƒ d } | j | ƒ } | | k sK t ‚ d  S(   Nu   somefileu	   otherfile(   R!   t   toucht   renameR$   (   R)   R   R
   R   R€   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_rename  s
    
c         C@ s2   t  | ƒ d } | j ƒ  } | | k s. t ‚ d  S(   Nu   newdir(   R!   t   mkdirR$   (   R)   R   R
   R€   (    (    s(   lib/python2.7/site-packages/test_path.pyt
   test_mkdir!  s    c         C@ s2   t  | ƒ d } | j ƒ  } | | k s. t ‚ d  S(   Nu
   empty file(   R!   Rƒ   R$   (   R)   R   R
   R€   (    (    s(   lib/python2.7/site-packages/test_path.pyt
   test_touch&  s    (   RW   Rd   t   __doc__R   R‚   R…   R‡   Rˆ   (    (    (    s(   lib/python2.7/site-packages/test_path.pyR}     s   				t   TestScratchDirc           B@ s  e  Z d  Z d „  Z d „  Z d „  Z e j j e	 d ƒ d d ƒe j j e
 j ƒ  d k oc e j d d ƒd	 „  ƒ ƒ Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e j j e e j d ƒ d d ƒd „  ƒ Z d „  Z d „  Z d „  Z RS(   uO   
    Tests that run in a temporary directory (does not test TempDir class)
    c         C@ sy   t  | ƒ } | d } | j ƒ  t j ƒ  } | ) t j ƒ  t j j | ƒ k sW t ‚ Wd QXt j ƒ  | k su t ‚ d S(   u)   Can be used as context manager for chdir.u   subdirN(   R!   t   makedirsR   R'   RK   t   realpathR$   (   R)   R   R1   t   subdirt   old_dir(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_context_manager0  s    

*c         C@ so  d } t  | ƒ } | d } t j ƒ  | } | j ƒ  t j ƒ  | } | j ƒ  sX t ‚ | j ƒ  sj t ‚ | j d k s t ‚ | | j k o™ | k n s¤ t ‚ t t	 j
 d ƒ rä | j } | | k oÖ | k n sä t ‚ n  t j | d ƒ t | d ƒ } | j d j d ƒ ƒ | j ƒ  t j | d ƒ t j ƒ  | }	 | j ƒ  t j ƒ  | }
 | | k o|	 k  o|
 k n sŒt ‚ | j ƒ  sžt ‚ | j ƒ  s°t ‚ | j d	 k sÅt ‚ |	 | j k oß|
 k n sêt ‚ t t	 j
 d ƒ rk| j } t	 j d
 k r;| | k s&t ‚ | |	 k  sht ‚ qk| | k sk| t j | j d ƒ k skt ‚ n  d  S(   Ni   u   test.txti    u   getctimei   u   abu
   some bytesu   utf-8i
   u   ntgü©ñÒMbP?(   R!   t   timeRƒ   t   existsR$   t   isfilet   sizet   mtimeRJ   R   RK   t   ctimet   sleept   opent   writet   encodet   closeR   Ry   t   approx(   R)   R   t	   thresholdR1   RB   t   t0t   t1t   ctt   fobjt   t2t   t3t   ct2(    (    s(   lib/python2.7/site-packages/test_path.pyRˆ   :  sB    

%	%

-%	c   	   	   C@ s„  t  | ƒ } | j ƒ  g  k s$ t ‚ d } | | } | t j j | | ƒ k sU t ‚ | j ƒ  zH| j ƒ  st t ‚ | j ƒ  | g k s t ‚ | j d ƒ | g k s­ t ‚ | j d ƒ | g k sË t ‚ | j d ƒ | g k sé t ‚ | j d ƒ | g k st ‚ | j d ƒ | g k s%t ‚ | j d ƒ g  k s@t ‚ | j d ƒ g  k s[t ‚ t	 | j
 d ƒ ƒ | j d ƒ k s…t ‚ t | j
 d ƒ t j ƒ s¦t ‚ Wd  | j ƒ  Xg  t d ƒ D] } | d	 | ^ qÂ} x4 | D], } t | d
 ƒ } | j d ƒ | j ƒ  qãWz6 | j ƒ  } | j ƒ  | j ƒ  | | k sHt ‚ Wd  x0 | D]( } y | j ƒ  WqSt k
 rzqSXqSWXd  S(   Nu   testfile.txtu	   test*.txtu   *.txtu   *txtu   *u   *.htmlu   testfilei   u   %d.txtu   wu
   some text
(   R!   t   listdirR$   R   RK   t   joinRƒ   R‘   t   globt   listt   iglobRH   t   typest   GeneratorTypet   removet   rangeR—   R˜   Rš   R9   R5   (	   R)   R   R1   RB   t   aft   it   filesR    t   files2(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listingp  sD    
!
*%'

u   10.13Rf   u!   macOS disallows invalid encodingsu   Windowsu&   Can't write latin characters. See #133c         C@ s   t  | ƒ j ƒ  g  k s t ‚ t | ƒ j d ƒ } d j d ƒ } t j j | | ƒ } t | d ƒ  Wd QXt j | ƒ s‚ t ‚ t  | ƒ j ƒ  } t	 | ƒ d k s¬ t ‚ | \ } t
 | t  ƒ sÊ t ‚ t j ƒ  d k rø | j ƒ  d k sô t ‚ d St	 | j ƒ  ƒ t	 | ƒ k st ‚ d S(	   u«   
        Some filesystems allow non-character sequences in path names.
        ``.listdir`` should still function in this case.
        See issue #61 for details.
        u   asciiu   rÃ©Ã±emiu   latin-1u   wbNi   u   Darwinu
   r%E9%F1emi(   R!   R¤   R$   R8   R™   R   RK   R¥   R—   t   lenRH   R   R   t   basename(   R)   R   t   tmpdir_bytest   filenamet   pathnamet   resultsR[   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listdir_other_encodingŸ  s    	c         C@ s  t  | ƒ } | d } | j ƒ  zÖ | d } | d d d } | j ƒ  z | j ƒ  s^ t ‚ Wd  | j ƒ  X| j ƒ  s€ t ‚ | j ƒ  s’ t ‚ | j d ƒ | j d ƒ z | j ƒ  sÁ t ‚ Wd  | j ƒ  X| j ƒ  sã t ‚ | j ƒ  sõ t ‚ Wd  t j	 | ƒ Xd  S(   Nu   temp.txtu   foou   baru   bazu   boziè  iÀ  (
   R!   Rƒ   R‹   t   isdirR$   t
   removedirsR‘   R†   R   R«   (   R)   R   R1   t   tempfR+   R.   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_makedirsÂ  s(    



c         C@ sX   i  } x | D] } d  | | <q Wi  } x | D] } d  | | <q. W| | k sT t ‚ d  S(   N(   R3   R$   (   R)   t   at   bt   adR®   t   bd(    (    s(   lib/python2.7/site-packages/test_path.pyt   assertSetsEqualß  s    c         C@ sž  t  | ƒ } | d } | d } | d } | d } | d } | d } | d }	 |	 | j | ƒ }
 | j ƒ  | j ƒ  | j ƒ  t | d ƒ } | j d	 d
 ƒ | j ƒ  | j | ƒ | j ƒ  sÌ t ‚ | j	 ƒ  | j	 ƒ  k sê t ‚ | | j
 } | j | ƒ | j ƒ  st ‚ | j	 ƒ  | j	 ƒ  k s4t ‚ t t d ƒ rS| j | ƒ n | j | ƒ | j |	 ƒ |	 j ƒ  st ‚ |  j |	 j ƒ  |	 | j
 |	 | j
 |
 g ƒ |
 j ƒ  s¿t ‚ |	 j ƒ  |	 j ƒ  sÜt ‚ | j |	 t ƒ |	 j ƒ  sþt ‚ |  j |	 j ƒ  |	 | j
 |	 | j
 |
 g ƒ t t d ƒ rg|
 j ƒ  sLt ‚ |
 j ƒ  | k sgt ‚ n  | j ƒ  | j ƒ  s„t ‚ |  j | j ƒ  g  ƒ d  S(   Nu   testdiru   testfile.txtu   Au   testcopy.txtu   testlink.txtu   Bu   Cu   wu   xi'  u   symlink(   R!   R#   R†   R—   R˜   Rš   t   copyfileR’   R$   t   bytesR   t   copyRJ   R   t   symlinkt   copytreeR¹   RÁ   R¤   t   islinkt   rmtreeR‘   Rm   t   readlinkt
   assertList(   R)   R   R1   t   testDirt   testFilet   testAt   testCopyt   testLinkt   testBt   testCt   testCopyOfLinkRB   t	   testCopy2(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_shutilì  s`    










	



	



c         C@ s"   t  | ƒ t  | ƒ k s t ‚ d  S(   N(   t   sortedR$   (   R)   t   listingRE   (    (    s(   lib/python2.7/site-packages/test_path.pyRÊ   4  s    c         C@ sß  t  | ƒ } d d d d d g } | | d | d | d d g } xF | D]> } | j ƒ  si | j ƒ  n  x | D] } | | j ƒ  qp WqJ W|  j | j d	 ƒ | d | d g ƒ |  j | j d	 ƒ | d g ƒ |  j | j d	 ƒ | d g ƒ |  j | j ƒ  g  | D] } | | k r	| ^ q	g  | D] } | D] } | | ^ q5q+ƒ |  j | j d	 ƒ g  | D] } | d ^ qi| d g ƒ |  j | j	 d	 ƒ g  | D] } | d ^ q¤ƒ |  j | j
 d	 ƒ | d g ƒ d  S(
   Nu   x.tmpu   x.xtmpu   x2gu   x22u   x.txtu   xdiru   xdir.tmpu   xsubdiru   *.tmp(   R!   R¹   R‹   Rƒ   RÊ   R¤   R¯   t   dirst   walkt	   walkfilest   walkdirs(   R)   R   R1   t   namesR×   t   eR   t   n(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_patterns7  s$    "'  ")0c         @ sQ   t  | ƒ } | d ‰  ‡  f d †  } | d ƒ | d ƒ | d ƒ | d ƒ d  S(   Nu   unicode.txtc   
      @ sl  d } d } d d d d d d g ‰ d d	 d	 d	 d
 d g } d d d d d d g } t  j ˆ d ˆ ƒ } | j | ƒ | j ƒ  ˆ j ƒ  | j ˆ ƒ k s¡ t ‚ ˆ j ˆ ƒ | k s¼ t ‚ ˆ j ˆ ƒ | k s× t ‚ ˆ j ˆ d t	 ƒ| k sø t ‚ ˆ d k rd S| d
 ‰  ˆ j
 ˆ  ˆ ƒ ˆ j
 ˆ  ˆ d t ƒd ˆ  j d
 t j ƒ j ˆ ƒ } | } | d c d
 7<ˆ j ƒ  | k s‰t ‚ ˆ j ˆ ƒ d ˆ  k s¨t ‚ ˆ j ˆ ƒ d | k sÇt ‚ ˆ j ˆ d t	 ƒd | k sìt ‚ ˆ j | ˆ ƒ ˆ j | ˆ d t ƒˆ j ƒ  | k s*t ‚ ˆ j ˆ ˆ ƒ ˆ j ˆ ˆ d t ƒˆ j ƒ  | k sht ‚ ‡  ‡ ‡ ‡ f d †  } | d
 ƒ | d ƒ | d ƒ | d ƒ ˆ j ˆ ˆ d d ƒˆ j ˆ ˆ d d d t ƒd | j ˆ ƒ } ˆ j ƒ  | k st ‚ ˆ j ˆ ƒ d | k s$t ‚ | }	 |	 d c | d 7<|	 | d 7}	 ˆ j ˆ ƒ |	 k sht ‚ d S(   u¥    Test that path works with the specified encoding,
            which must be capable of representing the entire range of
            Unicode codepoints.
            u?   Hello world
à´Šà¨à´•à¨•
à´Šà¨à´•à¨•Â…à´Šà¨à´•à¨•â€¨hangingu;   Hello world
à´Šà¨à´•à¨•
à´Šà¨à´•à¨•
à´Šà¨à´•à¨•

hangingu   Hello world
u   à´Šà¨à´•à¨•
u   à´Šà¨à´•à¨•Â…u   à´Šà¨à´•à¨•â€¨u   u   hangingu   à´Šà¨à´•à¨•
u   
u   Hello worldu   à´Šà¨à´•à¨•u    u   wt   retainu   UTF-16Nt   appendi   iÿÿÿÿc         @ sm   ˆ j  ˆ ˆ d |  ƒˆ j  ˆ ˆ d |  d t ƒd ˆ  j d |  ƒ j ˆ ƒ } ˆ j ƒ  | k si t ‚ d  S(   Nt   linesepRà   i   u   
(   t   write_linesRm   t   replaceR™   RÃ   R$   (   t   eolRE   (   t   cleanNoHangingt   enct
   givenLinesR
   (    s(   lib/python2.7/site-packages/test_path.pyt   testLinesep±  s    u   
u   Â…Rá   i    i   (   t   codecsR—   R˜   Rš   RÃ   R™   R$   t   textt   linest   Falset
   write_textRm   Rã   R   Rá   Râ   R3   (
   Ræ   t   givent   cleant   expectedLinest   expectedLines2RB   t   expectedBytest   expectedLinesNoHangingRè   t   expectedResultLines(   R
   (   Rå   Ræ   Rç   s(   lib/python2.7/site-packages/test_path.pyt   testQ  sx    			
!!
%



u   UTF-8u   UTF-16BEu   UTF-16LEu   UTF-16(   R!   (   R)   R   R1   Rõ   (    (   R
   s(   lib/python2.7/site-packages/test_path.pyt   test_unicodeM  s    
w


c         C@ s›   t  ƒ  d j ƒ  } d } d } | j | ƒ xH t | j | ƒ ƒ D]1 \ } } | | | | | | | !k sB t ‚ qB W| t | ƒ | d k s— t ‚ d  S(   Nu   test.txtu
   0123456789i   i   (   R   Rƒ   Rí   t	   enumeratet   chunksR$   R²   (   R)   R   R
   t   txtR“   R®   t   chunk(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_chunksÍ  s    ")u   samefileu   samefile not presentc         C@ s&  t  ƒ  d j ƒ  } | j d ƒ t  ƒ  d j ƒ  } | j d ƒ t  ƒ  d j ƒ  } | j d ƒ t  ƒ  d } | j | ƒ t j j | | ƒ | j | ƒ k s¤ t ‚ t j j | | ƒ | j | ƒ k sÎ t ‚ t j j | | ƒ | j | ƒ k sø t ‚ t j j | | ƒ | j | ƒ k s"t ‚ d  S(   Nu   1.txtu   foou   2.txtu   3.txtu   baru   4.txt(   R   Rƒ   Rí   RÂ   R   RK   t   samefileR$   (   R)   R   t   f1t   f2t   f3t   f4(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_samefile×  s    ***c         C@ s   t  | ƒ } | d } | j ƒ  | d j d ƒ | j ƒ  | j ƒ  sN t ‚ y | j ƒ  Wn t k
 r| |  j d ƒ n Xd  S(   Nu	   subfolderu   afileu	   somethinguK   Calling `rmtree_p` on non-existent directory should not raise an exception.(   R!   R†   Rí   t   rmtree_pR‘   R$   t   OSErrort   fail(   R)   R   R1   t   sub(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_rmtree_pê  s    


c         C@ sA   t  | ƒ } | d } | j ƒ  | j ƒ  | j ƒ  s= t ‚ d S(   ue   
        Invocation of rmdir_p on an existant directory should
        remove the directory.
        u	   subfolderN(   R!   R†   t   rmdir_pR‘   R$   (   R)   R   R1   R  (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_rmdir_p_exists÷  s
    


c         C@ s7   t  | ƒ } | d } | j ƒ  s) t ‚ | j ƒ  d S(   uD   
        A non-existent file should not raise an exception.
        u	   subfolderN(   R!   R‘   R$   R  (   R)   R   R1   R  (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_rmdir_p_nonexistent  s    
(   RW   Rd   R‰   R   Rˆ   R±   Ry   Rz   t   xfailR   R   R   RK   t   PY3R¸   R¼   RÁ   RÔ   RÊ   RÞ   Rö   Rû   R{   RJ   R   R  R  R  R	  (    (    (    s(   lib/python2.7/site-packages/test_path.pyRŠ   ,  s.   	
	6	/					H			€	
			t   TestMergeTreec           B@ sY   e  Z e j d  e ƒ d „  ƒ Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z RS(   R   c         C@ sÑ   t  | ƒ |  _ |  j d |  _ |  j d |  _ |  j d |  _ |  j d |  _ |  j j ƒ  |  j j ƒ  t |  j d ƒ  } | j d d ƒ Wd  QXt	 t
 d ƒ rº |  j j |  j ƒ n |  j j |  j ƒ d  S(	   Nu   Au   testfile.txtu   testlink.txtu   Bu   wu   xi'  u   symlink(   R!   t   test_dirt   subdir_at	   test_filet	   test_linkt   subdir_bR†   R—   R˜   RJ   R   RÅ   RÄ   (   R)   R   RB   (    (    s(   lib/python2.7/site-packages/test_path.pyt   testing_structure  s    c         C@ sM   t  |  j |  j j ƒ } t t d ƒ r1 | j n | j } | ƒ  sI t ‚ d  S(   Nu   symlink(	   R!   R  R  R   RJ   R   RÇ   R’   R$   (   R)   R   t   check(    (    s(   lib/python2.7/site-packages/test_path.pyt
   check_link   s    !c         C@ s‰   |  j  j |  j d t ƒ|  j j ƒ  s. t ‚ t |  j |  j j |  j |  j	 j f ƒ } t |  j j
 ƒ  ƒ | k s{ t ‚ |  j ƒ  d  S(   Nt   symlinks(   R  t
   merge_treeR  Rm   R¹   R$   t   setR  R   R  R¤   R  (   R)   RE   (    (    s(   lib/python2.7/site-packages/test_path.pyt    test_with_nonexisting_dst_kwargs%  s    !c         C@ s†   |  j  j |  j t ƒ |  j j ƒ  s+ t ‚ t |  j |  j j |  j |  j	 j f ƒ } t |  j j
 ƒ  ƒ | k sx t ‚ |  j ƒ  d  S(   N(   R  R  R  Rm   R¹   R$   R  R  R   R  R¤   R  (   R)   RE   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_with_nonexisting_dst_args/  s    !c         C@ s7  |  j  j ƒ  |  j j |  j  t ƒ |  j j ƒ  |  j d } | j ƒ  t |  j	 d ƒ  } | j
 d d ƒ Wd  QX|  j j |  j  t ƒ |  j  j ƒ  sž t ‚ t |  j  |  j	 j |  j  |  j j |  j  | j f ƒ } t |  j  j ƒ  ƒ | k sø t ‚ |  j ƒ  t t |  j  |  j	 j ƒ j ƒ  ƒ d k s3t ‚ d  S(   Nu   newfile.txtu   wu   xiˆ  (   R  RÈ   R  RÆ   Rm   R  R«   Rƒ   R—   R  R˜   R  R¹   R$   R  R   R¤   R  R²   R!   RÃ   (   R)   t   test_newRB   RE   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_with_existing_dst9  s     
!
c         C@ sl   t  j d ƒ } |  j j |  j d | ƒ|  j j ƒ  s= t ‚ |  j j ƒ  |  j |  j j	 g k sh t ‚ d S(   uS   
        merge_tree should accept parameters to copytree, such as 'ignore'
        u	   testlink*t   ignoreN(
   t   shutilt   ignore_patternsR  R  R  R¹   R$   R¤   R  R   (   R)   R  (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_copytree_parametersO  s    c         C@ s[   |  j  d } | j d ƒ |  j j |  j  d t j t j ƒ ƒ| j ƒ  d k sW t	 ‚ d S(   uª   
        merge_tree should accept a copy_function in which only
        newer files are copied and older files do not overwrite
        newer copies in the dest.
        u   testfile.txtu   this is newert   copy_functionN(
   R  Rí   R  R  RK   t
   only_newerR  t   copy2Rê   R$   (   R)   R   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_only_newerY  s    		(   RW   Rd   Ry   t   fixtureRm   R  R  R  R  R  R  R#  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR    s   		
	
		
t	   TestChdirc           B@ s   e  Z d  „  Z RS(   c         C@ sð   t  t | ƒ ƒ } | j ƒ  } t | ƒ t | ƒ k s< t ‚ | j ƒ  t | j ƒ  ƒ t | ƒ k sj t ‚ t  | ƒ } t | j ƒ  ƒ t | ƒ k sš t ‚ | j ƒ  t | j ƒ  ƒ t | ƒ k sÈ t ‚ t | j ƒ  ƒ t | ƒ k sì t ‚ d S(   u    tests the chdir or cd method N(   R!   R8   R'   R$   t   chdirt   cd(   R)   R   R1   R0   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_chdir_or_cdi  s    
$$
$(   RW   Rd   R(  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR%  h  s   t   TestSubclassc           B@ s   e  Z d  „  Z RS(   c         C@ sE   d t  f d „  ƒ  Y} | d ƒ } | d } t | | ƒ sA t ‚ d S(   u{   
        When operations are invoked on a subclass, they should produce another
        instance of that subclass.
        t   PathSubclassc           B@ s   e  Z RS(    (   RW   Rd   (    (    (    s(   lib/python2.7/site-packages/test_path.pyR*  ‰  s   u   /foou   barN(   R!   RH   R$   (   R)   R*  R
   R   (    (    s(   lib/python2.7/site-packages/test_path.pyt!   test_subclass_produces_same_class„  s    
(   RW   Rd   R+  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR)  ‚  s   t   TestTempDirc           B@ s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C@ sf   t  ƒ  } t | t j ƒ s! t ‚ | j ƒ  s3 t ‚ | j ƒ  sE t ‚ | j ƒ  | j ƒ  sb t ‚ d S(   uO   
        One should be able to readily construct a temporary directory
        N(   R   RH   RK   R!   R$   R‘   R¹   t   rmdir(   R)   R1   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_constructor’  s    	
c         C@ s9   t  ƒ  } | d } t | t j ƒ s+ t ‚ | j ƒ  d S(   ug   
        It should be possible to invoke operations on a TempDir and get
        Path classes.
        u   subdirN(   R   RH   RK   R!   R$   R-  (   R)   R1   R  (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_next_class  s    	
c         C@ s‚   t  ƒ  } | j ƒ  } | t j | ƒ k s0 t ‚ | d j ƒ  t | d t  ƒ sX t ‚ | j d d d ƒ | j	 ƒ  s~ t ‚ d S(   uz   
        One should be able to use a TempDir object as a context, which will
        clean up the contents after.
        u   somefile.txtN(
   R   t	   __enter__RK   R!   R$   Rƒ   RH   t   __exit__R3   R‘   (   R)   R1   R[   (    (    s(   lib/python2.7/site-packages/test_path.pyR   §  s    	c         C@ sj   t  ƒ  } | j ƒ  | d j ƒ  t | d t  ƒ s; t ‚ | j t t d ƒ d ƒ | j ƒ  sf t ‚ d S(   uO   
        The context manager will not clean up if an exception occurs.
        u   somefile.txtu   fooN(	   R   R0  Rƒ   RH   R$   R1  R4   R3   R‘   (   R)   R1   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_context_manager_exception´  s    	
c         C@ s;   t  ƒ   } | j ƒ  s t ‚ Wd QX| j ƒ  s7 t ‚ d S(   u‘   
        The context manager will allow using the with keyword and
        provide a temporry directory that will be deleted after that.
        N(   R   R¹   R$   (   R)   R1   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_context_manager_using_with¿  s    (   RW   Rd   R.  R/  R   R2  R3  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR,    s
   		
		t   TestUnicodec           B@ s,   e  Z e j d  e ƒ d „  ƒ Z d „  Z RS(   R   c         C@ s   t  | ƒ j d ƒ j ƒ  d  S(   Nu   â˜ƒ(   R!   RZ   R†   (   R)   R   (    (    s(   lib/python2.7/site-packages/test_path.pyt   unicode_name_in_tmpdirË  s    c         C@ s!   x t  | ƒ j ƒ  D] } q Wd  S(   N(   R!   RÚ   (   R)   R   R[   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_walkdirs_with_unicode_nameÐ  s    (   RW   Rd   Ry   R$  Rm   R5  R6  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR4  Ê  s   t   TestPatternMatchingc           B@ sY   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(	   c         C@ s:   t  d ƒ } | j d ƒ s! t ‚ | j d ƒ s6 t ‚ d  S(   Nu   FooBaru   Foo*u
   Foo[ABC]ar(   R!   t   fnmatchR$   (   R)   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_fnmatch_simpleÖ  s    c         C@ sC   t  d ƒ } t | _ | j d ƒ s* t ‚ | j d ƒ s? t ‚ d  S(   Nu   FooBaru   foobaru
   FOO[ABC]AR(   R!   RP   t   moduleR8  R$   (   R)   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_fnmatch_custom_modÛ  s    	c         C@ sO   d „  } t  d ƒ } | j d d | ƒs0 t ‚ | j d d | ƒsK t ‚ d  S(   Nc         S@ s
   |  j  ƒ  S(   N(   t   upper(   RK   (    (    s(   lib/python2.7/site-packages/test_path.pyR&   â  s    u   FooBaru   foobarR&   u
   FOO[ABC]AR(   R!   R8  R$   (   R)   R&   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_fnmatch_custom_normcaseá  s    	c         C@ s=   t  d ƒ } t | j ƒ  ƒ t t j d ƒ ƒ k s9 t ‚ d  S(   Nu   .(   R!   R²   R¤   R   R$   (   R)   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listdir_simpleè  s    c         C@ s+   t  d ƒ } | j d ƒ g  k s' t ‚ d  S(   Nu   .u    (   R!   R¤   R$   (   R)   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listdir_empty_patternì  s    c         C@ so   t  | ƒ } | d j ƒ  | d j ƒ  | j d ƒ | d g k sJ t ‚ t | j d ƒ ƒ d k sk t ‚ d  S(   Nu   subu   Fileu   s*u   *i   (   R!   R†   Rƒ   R¤   R$   R²   (   R)   R   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listdir_patternsð  s
    "c         C@ sµ   t  j t ƒ } | | ƒ } | d j ƒ  | d j ƒ  | j d ƒ g  k sR t ‚ t  j t ƒ } | | ƒ } | j d ƒ | d g k s t ‚ | j d ƒ | d g k s± t ‚ d S(   ux   
        Listdir patterns should honor the case sensitivity of the path module
        used by that Path class.
        u   subu   Fileu   S*u   f*N(   R!   RO   RQ   R†   Rƒ   R¤   R$   RP   (   R)   R   t   always_unixR
   t
   always_win(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listdir_custom_module÷  s    "c         C@ sÊ   t  | ƒ } | d j ƒ  | d j ƒ  | j t j d ƒ ƒ | d g k sS t ‚ | j t j d ƒ ƒ | d g k s~ t ‚ | j t j d ƒ ƒ g  k s¢ t ‚ | j t j d ƒ ƒ g  k sÆ t ‚ d S(   ux   
        Listdir patterns should honor the case sensitivity of the path module
        used by that Path class.
        u   subu   Fileu   S*u   f*N(	   R!   R†   Rƒ   R¤   R   t   CaseInsensitiveR$   R¯   R×   (   R)   R   R
   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_listdir_case_insensitive  s    ++$c         C@ sè   t  | ƒ } | d d j ƒ  | d d j ƒ  | d d d j ƒ  | d d d j ƒ  | d d d j ƒ  t | j t j d ƒ ƒ ƒ } t | ƒ d k s¨ t ‚ | d d d | k sÆ t ‚ | d d d | k sä t ‚ d  S(	   Nu   sub1u   foou   sub2u   bar.Txtu   bar.TXTu   bar.txt.bz2u   *.txti   (	   R!   R~   Rƒ   R§   RÙ   R   RD  R²   R$   (   R)   R   R
   R¯   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_walk_case_insensitive  s    (   RW   Rd   R9  R;  R=  R>  R?  R@  RC  RE  RF  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR7  Õ  s   								i   i   Rf   u)   in_place requires io module in Python 2.6t   TestInPlacec           B@ sh   e  Z e j d  j ƒ  ƒ Z e j d j ƒ  ƒ Z e j d j ƒ  ƒ Z e d „  ƒ Z	 d „  Z
 d „  Z RS(   u?   
        The quick brown fox jumped over the lazy dog.
        u?   
        .god yzal eht revo depmuj xof nworb kciuq ehT
        u
  
          Lorem ipsum dolor sit amet, consectetur adipisicing elit,
        sed do eiusmod tempor incididunt ut labore et dolore magna
        aliqua. Ut enim ad minim veniam, quis nostrud exercitation
        ullamco laboris nisi ut aliquip ex ea commodo consequat.
        Duis aute irure dolor in reprehenderit in voluptate velit
        esse cillum dolore eu fugiat nulla pariatur. Excepteur
        sint occaecat cupidatat non proident, sunt in culpa qui
        officia deserunt mollit anim id est laborum.
        c         C@ s<   t  | ƒ d } | j d ƒ  } | j |  j ƒ Wd  QX| S(   Nu   documentu   w(   R!   R—   R˜   t   reference_content(   t   clsR   R
   t   stream(    (    s(   lib/python2.7/site-packages/test_path.pyt   create_reference7  s    c   	      C@ s¡   |  j  | ƒ } | j ƒ  J \ } } x: | D]2 } d j t | j ƒ  ƒ ƒ d } | j | ƒ q+ WWd  QX| j ƒ   } | j ƒ  } Wd  QX| |  j k s t	 ‚ d  S(   Nu    u   
(
   RK  t   in_placeR¥   t   reversedt   stripR˜   R—   t   readt   reversed_contentR$   (	   R)   R   t   doct   readert   writert   linet   r_lineRJ  t   data(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_line_by_line_rewrite>  s    c      
   C@ s¿   |  j  | ƒ } t j t ƒ > } | j ƒ  ) \ } } | j |  j ƒ t d ƒ ‚ Wd  QXWd  QXd t | ƒ k sv t ‚ | j	 ƒ   } | j
 ƒ  } Wd  QXd | k s© t ‚ d | k s» t ‚ d  S(   Nu
   some erroru   Loremu   lazy dog(   RK  Ry   t   raisest   RuntimeErrorRL  R˜   t   alternate_contentR8   R$   R—   RO  (   R)   R   RQ  t   excRR  RS  RJ  RV  (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_exception_in_contextI  s    (   RW   Rd   t   textwrapt   dedentt   lstripRH  RP  RZ  t   classmethodRK  RW  R\  (    (    (    s(   lib/python2.7/site-packages/test_path.pyRG  !  s   		t   TestSpecialPathsc           B@ sz   e  Z e j d  e d d ƒ d „  ƒ Z e j d „  ƒ Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z RS(   R   t   scopeu   classc         C@ s   t  j d ƒ d  S(   Nu   appdirs(   Ry   t   importorskip(   RI  (    (    s(   lib/python2.7/site-packages/test_path.pyt   appdirs_installedW  s    c         C@ sG   | j  d d „  ƒ | j  d d ƒ | j  d d ƒ t j j d ƒ d  S(   Nu   platform.systemc           S@ s   d S(   Nu   Linux(    (    (    (    s(   lib/python2.7/site-packages/test_path.pyt   <lambda>]  s    u   sys.platformu   linuxu
   os.pathsepu   :u   appdirs(   t   setattrRi   t   modulest   pop(   R)   R   (    (    s(   lib/python2.7/site-packages/test_path.pyt   feign_linux[  s    c         C@ s   t  j d ƒ } | j ƒ  } t t ƒ j j | k s9 t ‚ | j ƒ  } t t ƒ j	 j | k sc t ‚ | j d d ƒ } t t d d ƒ j j | k s™ t ‚ d  S(   Nu   appdirsu   My Appu   Me(
   t	   importlibt   import_modulet   user_config_dirR   R!   t   usert   configR$   t   site_config_dirt   site(   R)   t   appdirsRE   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_basic_pathsd  s    c         C@ sX   | d } | j  t j d t | ƒ ƒ t | d ƒ } t t ƒ j j | k sT t ‚ d  S(   Nu   _configu   XDG_CONFIG_HOME(	   R   R   t   environR8   R   R!   Rm  Rn  R$   (   R)   R   R   Ri  t   fake_configRE   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_unix_pathsp  s    
c         C@ ss   | d } | j  t j d d t ƒ| j t j d t | ƒ ƒ t d ƒ j ƒ  } t t ƒ j	 j
 | k so t ‚ d S(   u6   Without XDG_CONFIG_HOME set, ~/.config should be used.u   _homeu   XDG_CONFIG_HOMEt   raisingu   HOMEu	   ~/.configN(   t   delitemR   Rs  Rì   R   R8   R!   t
   expanduserR   Rm  Rn  R$   (   R)   R   R   Ri  t	   fake_homeRE   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_unix_paths_fallbackv  s
    
c         C@ sg   t  t j ƒ  j j t ƒ s! t ‚ t  t j ƒ  j j t ƒ sB t ‚ t  t j ƒ  j j t ƒ sc t ‚ d  S(   N(   RH   R!   t   specialRm  Rn  R$   RV  t   cache(   R)   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_property~  s    !!c         C@ s7   t  j d d d t ƒ j j } t | t  ƒ s3 t ‚ d S(   uP   
        Other parameters should be passed through to appdirs function.
        R   u   1.0t	   multipathN(   R!   R{  Rm   Rp  Rn  RH   R$   (   R)   R[   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_other_parametersƒ  s    c         C@ s»   t  | d ƒ } t  | d ƒ } t j j | | g ƒ } | j t j d | ƒ t j d t ƒ j	 j
 } t | t ƒ s{ t ‚ | | k s t ‚ | | k sŸ t ‚ d t  | ƒ k s· t ‚ d S(   uO   
        If multipath is provided, on Linux return the XDG_CONFIG_DIRS
        u   _config1u   _config2u   XDG_CONFIG_DIRSR~  N(   R8   R   t   pathsepR¥   R   Rs  R!   R{  Rm   Rp  Rn  RH   R   R$   (   R)   Ri  R   R   t   fake_config_1t   fake_config_2t   config_dirsR[   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_multipathŠ  s    c         C@ sU   t  j d ƒ } t t d d ƒ} | j j } | j d d ƒ } | | k sQ t ‚ d S(   u—   
        Passing additional args and kwargs to SpecialResolver should be
        passed through to each invocation of the function in appdirs.
        u   appdirsR   u   1.0N(   Rj  Rk  R   R!   Rm  Rn  Rl  R$   (   R)   Rq  t   adpR[   RE   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_reused_SpecialResolver˜  s
    (   RW   Rd   Ry   R$  Rm   Rd  Ri  Rr  Ru  Rz  R}  R  R„  R†  (    (    (    s(   lib/python2.7/site-packages/test_path.pyRa  V  s   !							t   TestMultiPathc           B@ s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C@ s_   t  j t ƒ } t | t ƒ s$ t ‚ t | t  ƒ s9 t ‚ d t j } | j | k s[ t ‚ d S(   uV   
        Multi.for_class should return a subclass of the Path class provided.
        u   MultiN(   R   t	   for_classR!   t
   issubclassR$   RW   (   R)   RI  t   expected_name(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_for_class§  s
    c         C@ sG   t  j t ƒ j d ƒ } t | t ƒ s- t ‚ t | t  ƒ sC t ‚ d S(   u‰   
        If no pathsep is provided, multipath detect should return an instance
        of the parent class with no Multi mix-in.
        u   /foo/barN(   R   Rˆ  R!   t   detectRH   R$   (   R)   RK   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_detect_no_pathsep±  s    c         C@ sI   d } t  j j | ƒ } t j t ƒ j | ƒ } t | t ƒ sE t ‚ d S(   u~   
        If a pathsep appears in the input, detect should return an instance
        of a Path with the Multi mix-in.
        u   /foo/baru	   /baz/bingN(   u   /foo/baru	   /baz/bing(	   R   R€  R¥   R   Rˆ  R!   RŒ  RH   R$   (   R)   t   inputst   inputRK   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_detect_with_pathsepº  s    c         C@ s³   d } t  j j | ƒ } t j t ƒ j | ƒ } t | ƒ } t | ƒ } | d k sZ t	 ‚ t
 | t ƒ so t	 ‚ t
 | t ƒ s… t	 ‚ t | ƒ d k s t	 ‚ | | k s¯ t	 ‚ d S(   u`   
        Iterating over a MultiPath should yield instances of the
        parent class.
        u   /foo/baru	   /baz/bingN(   u   /foo/baru	   /baz/bing(   R   R€  R¥   R   Rˆ  R!   RŒ  t   itert   nextR$   RH   (   R)   RŽ  R  RK   R;   t   first(    (    s(   lib/python2.7/site-packages/test_path.pyt   test_iterationÅ  s    (   RW   Rd   R‹  R  R  R”  (    (    (    s(   lib/python2.7/site-packages/test_path.pyR‡  ¦  s   	
			u   path.PY2u   Python 2 has no __future__c          C@ s&   t  j d d d g }  t j |  ƒ d S(   uw   
    Path.py guarantees that the path module can be
    transplanted into an environment without any dependencies.
    u   -Su   -cu   import pathN(   Ri   Rj   Rk   t
   check_call(   Rt   (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_no_dependencies×  s    c           C@ s   t  j d t j ƒ s t ‚ d S(   uL   
    Under normal circumstances, path should present a
    __version__.
    u
   \d+\.\d+.*N(   Rn   t   matchRK   t   __version__R$   (    (    (    s(   lib/python2.7/site-packages/test_path.pyt   test_versionå  s    (7   R‰   t
   __future__R    R   R   Ré   R   Ri   R  R   R©   RP   RQ   R]  R   Rj  t   operatorRq   Rk   Rn   Ry   t   packaging.versionR   RK   R   R   R   R   R3   R!   R
   R$  Rm   R   t   geR   R   Re   R}   RŠ   R  R%  R)  R,  R4  R7  Rz   R{   t   version_infoRG  Ra  R‡  R
  R–  R™  (    (    (    s(   lib/python2.7/site-packages/test_path.pyt   <module>   sZ   	'¦%ÿ á\:L	3P1!