
    g
                        d dl Z de _        d dlmZ d dlZd dlmZmZ d dlm	Z	 d dl
mZ d dlZ	 d dlZej                  j                  dd       ej                  j!                  d        ej$                  d
      Zd Zd Zd Zd Zd Z ej2                  dd      d        Z ej2                  dd      d        Zy# e$ r	  ed	      w xY w)    NT)version_tuple)clear_cache	USE_CACHE)GROUND_TYPES)ARCHsympy_hypothesis_profile)deadlinezhypothesis is a required dependency to run the SymPy test suite. Install it with 'pip install hypothesis' or 'conda install -c conda-forge hypothesis'z([0-9]+)/([1-9][0-9]*)c                    | j                  d      }|sy t        j                  |      }|st        d      t	        t
        |j                               \  }}|dz
  t        |      z  |z  |t        |      z  |z  }}||k  r||d = |d |= y )N--splitz>split must be a string of the form a/b where a and b are ints.   )	getoptionspmatch
ValueErrormapintgroupslen)configitemssplitmitstartends           C/var/www/openai/venv/lib/python3.12/site-packages/sympy/conftest.pyprocess_splitr      s    Y'E
AO
 	
 sAHHJDAqa%3u:%*AE
Na,?3E1u#$Kfuf    c                     dt         z  }|dt        z  z  }d}t        dk(  rdd l}|j	                         }nt        dk(  r	 ddlm} d| d	}|dt        d|dz  }|S # t        $ r d
}Y w xY w)Nzarchitecture: %s
zcache:        %s
 gmpyr   flint)__version__z(python-flint==)unknownzground types:  
)r   r   r   gmpy2versionr#   r$   ImportError)r   sr*   r)   r$   s        r   pytest_report_headerr-   -   s    t#A			))AGv--/		 	7) (}A6GL'	::AH  	 G	 s    A A,+A,c                     | j                   j                  dd       s| j                   j                  dd       r| j                  dddd       y y )Nerrorfailedr'   zDO *NOT* COMMIT!T)redbold)statsget	write_sep)terminalreporters    r   pytest_terminal_summaryr7   @   sP    !!'404D4J4J4N4N$5 	""3(:4"P5r   c                 .    | j                  dddd       y )Nr   storer!   zsplit tests)actiondefaulthelp)	addoption)parsers    r   pytest_addoptionr?   G   s    
YwOr   c                     t        | |       y)zpytest hook.N)r   )r   r   s     r   pytest_collection_modifyitemsrA   K   s     &% r   module)autousescopec                      t                y )N)r    r   r   file_clear_cacherG   Q   s    Mr   c                 J   t        | j                  dd      rt        j                  d       y t        | j                  dd      r_t	        t        j
                        t	        d      k  r9t        j                  j                  d      dk7  rt        j                  d       y y y y )	NdisabledFztest requirements not met.ipythonz2.6.3z-snoz0run py.test with -s or upgrade to newer version.)getattrrB   pytestskipr   r$   r   getvalue)requests    r   check_disabledrQ   V   s}    w~~z5101	E	2 &,,-g0FF&&t,4KKJK 5 G 
3r   )sys_running_pytestsympy.external.importtoolsr   rM   sympy.core.cacher   r   sympy.external.gmpyr   sympy.utilities.miscr   re
hypothesissettingsregister_profileload_profiler+   compiler   r   r-   r7   r?   rA   fixturerG   rQ   rF   r   r   <module>r_      s    
  4  3 , % 		(()Cd(S$$%?@ RZZ)*$&QP! H- . H-	L .	LM  
	` s   <C C