
    shh
                         S r SSKrSSKrSSKJr  SSKJrJr  SSKJ	r	J
r
  SSKrSSKrSSKr\R                  " SS9S 5       r\
R                    " S	 S
\
R"                  5      5       rg)z#Tests for distutils.command.config.    N)log)config	dump_file)missing_compiler_executablesupportT)autousec                 l    U R                   n/ Ul        UR                  [        SUR                  5        g )Ninfo)instance_logssetattrr   _info)requestmonkeypatchselfs      /Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/setuptools/_distutils/tests/test_config_cmd.pyinfo_logr      s*    DDJVTZZ0    c                   n    \ rS rSrS rS r\R                  R                  S5      S 5       r	S r
S rSrg	)

TestConfig   c                 h    UR                  5        H  nU R                  R                  U5        M      g )N)
splitlinesr   append)r   msgargslines       r   r   TestConfig._info   s%    NN$DJJd# %r   c                 (   [         R                  " [        5      R                  S5      nUR	                  SS9 n[
        R                  " U5      nS S S 5        [        US5        [        U R                  5      WS-   :X  d   eg ! , (       d  f       N9= f)Nz.pyzutf-8)encodingzI am the header   )
pathPath__file__with_suffixopenmore_itertoolsilenr   lenr   )r   	this_filefnumliness       r   test_dump_fileTestConfig.test_dump_file   sp    IIh'33E:	^^W^-%**1-H . 	)./4::(Q,...	 .-s   B
Bzplatform.system() == "Windows"c                    [        S/5      nUb  U R                  SU< S35        U R                  5       u  p#[        U5      nUR	                  5         UR
                  n[        R                  S S S:X  a2  SUR                  S   R                  5       ;   a  U R                  S5        UR                  S	S
S9nUS:X  d   eUR                  SS
S9nUS:X  d   eg )NpreprocessorzThe z command is not found   aixxlcr   zAxlc: The -E option overrides the -P, -o, and -qsyntaxonly optionsxxxz	/* xxx */)patternbody_configtestr!   )r   skipTestcreate_distr   _check_compilercompilersysplatformr0   lower
search_cpp)r   cmdpkg_dirdistr;   matchs         r   test_search_cppTestConfig.test_search_cpp#   s    )>*:;?MMD'<=>((*Tl<<<<u$(2G2G2J2P2P2R)RMMS
 u;?zz};Gzzr   c                 F   U R                  5       u  p[        U5      nS[        R                   S3Ul        SUl        S[        R                   S3Ul        UR                  5         UR                  SS/:X  d   eUR
                  S/:X  d   eUR                  SS/:X  d   eg )Nonetwothreefour)r9   r   ospathsepinclude_dirs	librarieslibrary_dirsensure_finalized)r   rA   rB   r@   s       r   test_finalize_options TestConfig.test_finalize_options8   s     ((*Tl C0"2::,d3E5>111}}'''GV#4444r   c                    U R                  5       n[        R                  R                  US5      n[        R                  R                  US5      nU R	                  US5        U R	                  US5        X#4 H)  n[        R                  R                  U5      (       a  M)   e   U R                  5       u  pV[        U5      nUR                  X#5        X#4 H)  n[        R                  R                  U5      (       d  M)   e   g )NrG   rH   r4   )	mkdtemprK   r"   join
write_fileexistsr9   r   _clean)r   tmp_dirf1f2r+   rA   rB   r@   s           r   
test_cleanTestConfig.test_cleanF   s    ,,.WW\\'5)WW\\'5)E"E"A77>>!$$$$  ((*Tl

2Aww~~a(((( r    N)__name__
__module____qualname____firstlineno__r   r-   pytestmarkskipifrD   rQ   r\   __static_attributes__r^   r   r   r   r      s:    $/ [[89 :(5)r   r   )__doc__rK   r<   distutils._logr   distutils.command.configr   r   distutils.testsr   r   r'   r"   rc   fixturer   combine_markersTempdirManagerr   r^   r   r   <module>rn      sg    ) 	 
  6 @    1 1 	A)'' A) A)r   