ó
X¾÷Xc           @  se   d  d l  m Z d  d l Z d  d l Z d  d l m Z d  d l m Z d e j f d „  ƒ  YZ	 d S(   iÿÿÿÿ(   t   print_functionN(   t   files(   t   baset   FilesConfigTestc           B  s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C  sS  t  t |  ƒ j ƒ  t j d d d g ƒ } |  j | ƒ t j j | j	 d ƒ } t j j | d ƒ } t j j | j	 d d ƒ } t j
 | ƒ t j
 | ƒ t t j j | d ƒ d	 ƒ  } | j d
 ƒ Wd  QXt t j j | d ƒ d	 ƒ  } | j d ƒ Wd  QXt t j j | d ƒ d	 ƒ  } | j d ƒ Wd  QX|  j t	 j | j	 ƒ ƒ d  S(   Nt   fake_packages   fake_module.pyt    s   other_fake_module.pyt   etct   subt
   subpackaget   foot   ws   Foo Datat   bars   Bar Datas   __init__.pys   # empty(   s   fake_module.pyR   (   s   other_fake_module.pyR   (   t   superR   t   setUpt   fixturest   PythonPackaget
   useFixturet   ost   patht   joinR   t   makedirst   opent   writet   DiveDir(   t   selft   pkg_fixturet   pkg_etct   pkg_subR   t   foo_file(    (    s1   /tmp/pip-build-h1VYrz/pbr/pbr/tests/test_files.pyR      s&    	!!!c         C  sD   t  d t  ƒ  ƒ } t j | d ƒ j ƒ  |  j d | d d ƒ d  S(   NR   R   R   t   packages(   t   dictR   t   FilesConfigt   runt   assertIn(   R   t   config(    (    s1   /tmp/pip-build-h1VYrz/pbr/pbr/tests/test_files.pyt   test_implicit_auto_package4   s    c         C  sJ   t  d t  d d ƒ ƒ } t j | d ƒ j ƒ  |  j d | d d ƒ d  S(   NR   R   R   R   (   R   R   R   R    R!   (   R   R"   (    (    s1   /tmp/pip-build-h1VYrz/pbr/pbr/tests/test_files.pyt   test_auto_package<   s
    c         C  sJ   t  d t  d d ƒ ƒ } t j | d ƒ j ƒ  |  j d | d d ƒ d  S(   NR   t
   data_filess   
  etc/pbr = etc/*R   s1   
etc/pbr/ = 
 etc/foo
etc/pbr/sub = 
 etc/sub/bar(   R   R   R   R    R!   (   R   R"   (    (    s1   /tmp/pip-build-h1VYrz/pbr/pbr/tests/test_files.pyt   test_data_files_globbingE   s    (   t   __name__t
   __module__R   R#   R$   R&   (    (    (    s1   /tmp/pip-build-h1VYrz/pbr/pbr/tests/test_files.pyR      s   				(
   t
   __future__R    R   R   t	   pbr.hooksR   t	   pbr.testsR   t   BaseTestCaseR   (    (    (    s1   /tmp/pip-build-h1VYrz/pbr/pbr/tests/test_files.pyt   <module>   s
   