U
    3‰d@  ã                   @   s$   d dl Z d dlZd dlZdd„ ZdS )é    Nc                  C   s†   t  tj¡jjd } |  ¡ s&t d¡ t  tj¡j}|  ¡  	d¡}dd„ |D ƒ}| 
d¡D ]&}| |j¡}| d¡}||ksZt‚qZdS )	zACheck the consistence of the files generated from template files.z
.gitignorez(Tests are not run from the source folderÚ
c                 S   s   g | ]}t  |¡‘qS © )ÚpathlibÚPath)Ú.0Úliner   r   úN/tmp/pip-unpacked-wheel-zrfo1fqw/sklearn/utils/tests/test_cython_templating.pyÚ
<listcomp>   s     zEtest_files_generated_by_templates_are_git_ignored.<locals>.<listcomp>z**/*.tpÚ N)r   r   ÚsklearnÚ__file__ÚparentÚexistsÚpytestÚskipÚ	read_textÚsplitÚglobÚrelative_toÚwith_suffixÚAssertionError)Zgitignore_fileÚbase_dirZignored_filesÚfilenameZfilename_wo_tempita_suffixr   r   r   Ú1test_files_generated_by_templates_are_git_ignored   s    

r   )r   r   r   r   r   r   r   r   Ú<module>   s   