U
    9%e                     @   s   d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
 d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ dd	 Zd
d Zdd Zdd Zdd Zdd Zdd Zdd Zdd ZdS )    )S)rm_idglomflattenunpacksort
distributesubsrebuild)Basic)Add)Mul)symbolsxc                  C   s   t dd } | ttdtdttdks2t| ttdtdttdksXt| ttdtdttdtdkstd S )Nc                 S   s   | dkS Nr    r   r   r   ]/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/sympy/strategies/tests/test_rl.py<lambda>       ztest_rm_id.<locals>.<lambda>r         )r   r   r   AssertionError)Zrmzerosr   r   r   
test_rm_id   s    &&r   c               	   C   sl   dd } dd }dd }t | ||}|ttt dt ddd	d
}tdt d}t|jt|jkshtd S )Nc                 S   s   |   d S )Nr   Zas_coeff_Mulr   r   r   r   key   s    ztest_glom.<locals>.keyc                 S   s   |   d S r   r   r   r   r   r   count   s    ztest_glom.<locals>.countc                 S   s   | | S )Nr   )Zcntargr   r   r   newargs   s    ztest_glom.<locals>.newargs   r   Fevaluate   )r   r   r   setargsr   )r   r   r   rlresultexpectedr   r   r   	test_glom   s    r(   c                   C   sL   t ttdtdttdtdttdtdtdtdksHtd S )Nr   r   r      )r   r   r   r   r   r   r   r   test_flatten#   s    $r*   c                   C   sH   t ttddkstt ttdtdttdtdksDtd S )Nr   r   )r   r   r   r   r   r   r   r   test_unpack(   s    r+   c                   C   s@   t tttdtdtdttdtdtdks<td S )Nr   r   r   )r   strr   r   r   r   r   r   r   	test_sort-   s    r-   c               	   C   s   G dd dt } G dd dt }t| |}|| tdtd|tdtdtd	|| tdtdtdtd	| tdtdtdtd	kst|| tdtdtd| tdtdtdkstd S )
Nc                   @   s   e Zd ZdS )ztest_distribute.<locals>.T1N__name__
__module____qualname__r   r   r   r   T12   s   r2   c                   @   s   e Zd ZdS )ztest_distribute.<locals>.T2Nr.   r   r   r   r   T25   s   r3   r   r   r   r)   r"   )r   r   r   r   )r2   r3   Zdistribute_t12r   r   r   test_distribute1   s    
*<r4   c                  C   sT   t d\} }tdt| |dd}ttd| td|}ttt}|||ksPtd S )Nzx, yr   Fr    )r   r   r   r   r   )r   yexprr'   Zdistribute_mulr   r   r   test_distribute_add_mul>   s
    
r7   c                  C   s.   t dd} | ddkst| ddks*td S Nr   r   r   )r	   r   )r%   r   r   r   	test_subsF   s    
r9   c                  C   s*   t ttdtd} t| dks&td S r8   )r   __new__r   r   r
   r   )r6   r   r   r   test_rebuildL   s    r;   N)Zsympy.core.singletonr   Zsympy.strategies.rlr   r   r   r   r   r   r	   r
   Zsympy.core.basicr   Zsympy.core.addr   Zsympy.core.mulr   Zsympy.core.symbolr   Z	sympy.abcr   r   r(   r*   r+   r-   r4   r7   r9   r;   r   r   r   r   <module>   s   (