
    c                    b    d dl mZ d dlZd dlmZ d dlmZ dZ	 dZ	 h dZ		 h dZ
	 ddZddZdS )    )annotationsN)Path)FunctionalTestFile0      >   ext
regressionregression_02deprecated_relative_import>   r   	docparamsr   	input_dir
Path | strreturnlist[FunctionalTestFile]c                z   g }t          t          |                      t          j        |           D ]\  }}}|                    d          r|                                 |                                 |D ]@}|dk    r8|                    d          r#|                    t          ||                     A|S )z*Get all functional tests in the input_dir.__pycache__z__init__.py.py)!_check_functional_tests_structurer   oswalkendswithsortappendr   )r   suitedirpathdirnames	filenamesfilenames         Qlib/python3.11/site-packages/pylint/testutils/functional/find_functional_tests.py(get_functional_test_files_from_directoryr    !   s     E%d9oo666(*	(:(: D D$9M** 	! 	D 	DH=( DX->->u-E-E D/BBCCC	D L    	directoryr   Nonec                   t          |           j                            d          rdS t                      }t                      }|                                 D ]}|                                r;|j        dk    r/|j                            d          s|                    |           Q|                                r$|                    |           t          |           t          |          t          k    s)J |  ddt          |           dt           dz               |D ]}|j        |j                            d          d         z  }|                                rJ | d	| d
            t          |j        j                  dk    sc|j        j        t          vrP|j        j        j        t           vr8|j                            |j        j                  sJ | d|j                     dS )z?Check if test directories follow correct file/folder structure._Nr   z* contains too many functional tests files (z > z).r   z should go in .   z should not go in )r   stem
startswithsetiterdiris_filesuffixaddis_dirr   len!REASONABLY_DISPLAYABLE_VERTICALLYparentsplitexistsIGNORED_PARENT_DIRSIGNORED_PARENT_PARENT_DIRS)r"   filesdirsfile_or_dirfilepossible_dirs         r   r   r   4   s0    I&&s++ uuEeeD !((** ; ;   	;!U* ';3C3N3Ns3S3S '		+&&&!! 	;HH[!!!-k:::u::::  @@@
Bc%jj
B
B>
B
B
B	C  
  8 8{TY__S%9%9!%<<&&((PPT*P*P*P*P*PPPP DK$%%*	8 (;;	8 "'/II	8
 9''   8 877$+778 8 88 8r!   )r   r   r   r   )r"   r   r   r#   )
__future__r   r   pathlibr   %pylint.testutils.functional.test_filer   r2   SHOULD_BE_IN_THE_SAME_DIRECTORYr6   r7   r    r    r!   r   <module>rB      s   
 # " " " " " 				       D D D D D D$& ! L"#  H    8   
 C   &#8 #8 #8 #8 #8 #8r!   