o
    ]Zh  ć                   @   s"   d dl Z d dlZG dd dZdS )é    Nc                   @   s4   e Zd Zdd Zdd Zdd Zdd Zd	d
 ZdS )ŚTestReciprocityc                 C   s(   t  ddg”}t  |”}|dksJ d S )N©é   é   )r   r   g      š?©ŚnxŚDiGraphŚreciprocity©ŚselfŚDGr	   © r   śY/var/www/auris/lib/python3.10/site-packages/networkx/algorithms/tests/test_reciprocity.pyŚtest_reciprocity_digraph   s   
z(TestReciprocity.test_reciprocity_digraphc                 C   sD   t  tj” t ” }t |” W d    d S 1 sw   Y  d S )N)ŚpytestŚraisesr   ŚNetworkXErrorr   Zoverall_reciprocity©r   r   r   r   r   Ś$test_overall_reciprocity_empty_graph   s   "žz4TestReciprocity.test_overall_reciprocity_empty_graphc                 C   s8   t  g d¢”}t  |ddg”}ddd}||ksJ d S )N©r   )r   é   )r   r   r   r   g        ēUUUUUUå?r   r   )r   r   r	   Zexpected_reciprocityr   r   r   Śtest_reciprocity_graph_nodes   s   
z,TestReciprocity.test_reciprocity_graph_nodesc                 C   s*   t  g d¢”}t  |d”}|dksJ d S )Nr   r   r   r   r
   r   r   r   Śtest_reciprocity_graph_node   s   z+TestReciprocity.test_reciprocity_graph_nodec                 C   sT   t  tj” t dg”}| d” t |d” W d    d S 1 s#w   Y  d S )Nr   é   )r   r   r   r   r   Śadd_noder	   r   r   r   r   Ś%test_reciprocity_graph_isolated_nodes!   s
   
"żz5TestReciprocity.test_reciprocity_graph_isolated_nodesN)Ś__name__Ś
__module__Ś__qualname__r   r   r   r   r   r   r   r   r   r      s    r   )r   Znetworkxr   r   r   r   r   r   Ś<module>   s    