o
    ßË·e¿  ã                   @   sè   d Z ddlZddlZe d¡Ze d¡de d¡de d¡d	e ¡ d
iZ	e d¡de d¡de d¡de ¡ de 
d¡diZej de	 ¡ ¡dd„ ƒZej de	 ¡ ¡dd„ ƒZej de ¡ ¡dd„ ƒZej de ¡ ¡dd„ ƒZdS )zAUnit tests for the :mod:`networkx.algorithms.polynomials` module.é    NÚsympyé   Ú1é   z1x**3 + 3*x**2 + 4*x*y + 2*x + y**3 + 3*y**2 + 2*yé   zx**4 + x**3 + x**2 + x + yz$x**3 + 2*x**2 + 2*x*y + x + y**2 + yÚxzx**4 - 6*x**3 + 11*x**2 - 6*xz'x**5 - 5*x**4 + 10*x**3 - 10*x**2 + 4*xzx**4 - 5*x**3 + 8*x**2 - 4*xz#x**5 - 4*x**4 + 6*x**3 - 4*x**2 + x©ÚGÚexpectedc                 C   ó   t  | ¡ |¡s
J ‚d S ©N)ÚnxÚtutte_polynomialÚequalsr   © r   úa/var/www/ideatree/venv/lib/python3.10/site-packages/networkx/algorithms/tests/test_polynomials.pyÚtest_tutte_polynomial   ó   r   r	   c                 C   ó<   t  | ¡}t  | | ¡}t  |¡}t || ¡ |¡sJ ‚dS )zžTutte polynomial factors into the Tutte polynomials of its components.
    Verify this property with the disjoint union of two copies of the input graph.
    N)r   r   Údisjoint_unionr   Úsimplifyr   )r	   Út_gÚHÚt_hr   r   r   Útest_tutte_polynomial_disjoint    s   

r   c                 C   r   r   )r   Úchromatic_polynomialr   r   r   r   r   Útest_chromatic_polynomial+   r   r   c                 C   r   )zªChromatic polynomial factors into the Chromatic polynomials of its
    components. Verify this property with the disjoint union of two copies of
    the input graph.
    N)r   r   r   r   r   r   )r	   Úx_gr   Úx_hr   r   r   Ú"test_chromatic_polynomial_disjoint0   s   

r   )Ú__doc__ÚpytestÚnetworkxr   Úimportorskipr   Úcomplete_graphÚcycle_graphÚdiamond_graphÚ_test_tutte_graphsÚ
path_graphÚ_test_chromatic_graphsÚmarkÚparametrizeÚitemsr   Úkeysr   r   r   r   r   r   r   Ú<module>   s.    



ü



û	



