
    i2                        S r SSKrSSKrSSKrSSKrSSKJr  \R                  R                  r\R                  R                  r	\R                  R                  r
\R                  R                  r\R                  R                  SS/SS9r\R                  R                  SS/SS9rS	\4S
 jrS	\4S jrS\4S jrSS jrg)zS
Decorators for skipping PyInstaller tests when specific requirements are not met.
    N)check_requirementpyi_builderonedirT)indirectonefilepackagec                     [        U 5      (       d#  [        R                  R                  SU  S35      $ [        R                  R	                  SSU  S3S9$ )a  
Skip a decorated test if **package** is not importable.

Arguments:
    package:
        The name of the module. May be anything that is allowed after the ``import`` keyword. e.g. 'numpy' or
        'PIL.Image'.
Returns:
    A pytest marker which either skips the test or does nothing.

This function intentionally does not import the module. Doing so can lead to `sys.path` and `PATH` being
polluted, which then breaks later builds.
zCan't import 'z'.FDon't skip: 'z' is importable.reason)
importablepytestmarkskipskipif)r   s    DC:\des-py\RoboSAPF\venv\Lib\site-packages\PyInstaller/utils/tests.pyimportorskipr   "   sQ     g{{.	 <==;;emG9DT,UVV    c                     SSK Jn  SU ;   aS  [        U R                  S5      S   5      (       d  gSSKJnJn  U" [        R                  SSU -   /X"S9R                  S:H  $ U" U 5      S L$ )	Nr   )	find_spec.F)DEVNULLrunz-czimport )stdoutstderr)
importlib.utilr   r   split
subprocessr   r   sys
executable
returncode)r   r   r   r   s       r   r   r   5   sf    ( g~'--,Q/00+CNND)g*=>w_jjnoooWT))r   requirementc                     [        U 5      (       a"  [        R                  R                  SSU  S3S9$ [        R                  R	                  SU  S35      $ )a  
Mark a test to be skipped if **requirement** is not satisfied.

Args:
    requirement:
        A distribution name and optional version specifier(s). See :func:`PyInstaller.utils.hooks.check_requirement`
        which this argument is forwarded to.
Returns:
    Either a skip marker or a dummy marker.

This function operates on distribution metadata, and does not import any modules.
Fr
   z' is satisfied.r   z	Requires r   )r   r   r   r   r   )r"   s    r   requiresr$   E   sP     %%{{!!%-}O0\!]]{{)K= :;;r   c                     [         R                  " 5       S   S   nU(       a  US-   U-   nUR                  SS5      nXS-   -  n[        R                  " U5      nUR                  USS9  U$ )	at  
Generate a source file for testing.

The source will be written into a file named like the test-function. This file will then be passed to
`test_script`. If you need other related file, e.g. as `.toc`-file for testing the content, put it at at the
normal place. Just mind to take the basnename from the test-function's name.

:param script: Source code to create executable from. This will be saved into a temporary file which is then
               passed on to `test_script`.

:param test_id: Test-id for parametrized tests. If given, it will be appended to the script filename,
                separated by two underscores.
      __r   _z.pyzutf-8)encoding)inspectstackreplacetextwrapdedent
write_text)tmp_pathsourcetest_idtestname
scriptfiles        r   gen_sourcefiler6   X   sr     }}q!!$Hd?W, S)H-.J__V$F&73r   )N)__doc__r+   r   r.   r   PyInstaller.utils.hooksr   r   parametrizer   xfailr   onedir_onlyonefile_onlystrr   r   r$   r6    r   r   <module>r?      s     
   5 kk%%			{{ kk%%mhZ$%O{{&&}ykD&QW# W&* * <# <&r   