o
    ¦ƒðj×
  ã                   @   sô   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zd dlZejjddd� ej d¡ W n eyH   ed	ƒ‚w e d
¡Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zejddd�dd„ ƒZejddd�dd„ ƒZdS )é    NT)Úversion_tuple)Úclear_cacheÚ	USE_CACHE)ÚGROUND_TYPES)ÚARCHÚsympy_hypothesis_profile)Údeadlinez–hypothesis 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                 C   s€   |   d¡}|s	d S t |¡}|stdƒ‚tt| ¡ ƒ\}}|d t|ƒ | |t|ƒ | }}||k r9||d …= |d |…= d S )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Úend© r   ú�/tmp/claude-1000/-var-www-html-academy/3f42efd1-c2b7-4d08-9b05-30d86bb35479/scratchpad/piper/venv/lib/python3.10/site-packages/sympy/conftest.pyÚprocess_split   s   

ÿ&
r   c                 C   s‚   dt  }|dt 7 }d}tdkrdd l}| ¡ }ntdkr7zddlm} W n ty0   d}Y nw d	|› d
�}|dt|f 7 }|S )Nzarchitecture: %s
zcache:        %s
Ú Úgmpyr   Úflint)Ú__version__Úunknownz(python-flint==ú)zground types: %s %s
)r   r   r   Úgmpy2Úversionr    r!   ÚImportError)r   Úsr%   r$   r!   r   r   r   Úpytest_report_header-   s   
ÿr(   c                 C   s6   | j  dd ¡s| j  dd ¡r| jddddd� d S d S )NÚerrorÚfailedú zDO *NOT* COMMIT!T)ÚredÚbold)ÚstatsÚgetÚ	write_sep)Úterminalreporterr   r   r   Úpytest_terminal_summary@   s
   ÿýr2   c                 C   s   | j ddddd� d S )Nr	   Ústorer   zsplit tests)ÚactionÚdefaultÚhelp)Ú	addoption)Úparserr   r   r   Úpytest_addoptionG   s   r9   c                 C   s   t | |ƒ dS )zpytest hook.N)r   )r   r   r   r   r   Úpytest_collection_modifyitemsK   s   r:   Úmodule)ÚautouseÚscopec                   C   s
   t ƒ  d S )N)r   r   r   r   r   Úfile_clear_cacheQ   s   
r>   c                 C   sf   t | jddƒrt d¡ d S t | jddƒr-ttjƒtdƒk r/tj d¡dkr1t d¡ d S d S d S d S )	NÚdisabledFztest requirements not met.Úipythonz2.6.3z-sÚnoz0run py.test with -s or upgrade to newer version.)Úgetattrr;   ÚpytestÚskipr   r!   r   Úgetvalue)Úrequestr   r   r   Úcheck_disabledV   s   úrG   )ÚsysÚ_running_pytestÚsympy.external.importtoolsr   rC   Úsympy.core.cacher   r   Úsympy.external.gmpyr   Úsympy.utilities.miscr   ÚreÚ
hypothesisÚsettingsÚregister_profileÚload_profiler&   Úcompiler   r   r(   r2   r9   r:   Úfixturer>   rG   r   r   r   r   Ú<module>   s6    ÿÿ

