o
    ˷e                     @   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   a/var/www/ideatree/venv/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   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	   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   networkxr   r   r   r   r   r   <module>   s    