
    h                     (    S SK r S SKr " S S5      rg)    Nc                   2    \ rS rSrS rS rS rS rS rSr	g)	TestReciprocity   c                 p    [         R                  " SS/5      n[         R                  " U5      nUS:X  d   eg )N      )r	   r   g      ?nxDiGraphreciprocityselfDGr   s      \/var/www/html/env/lib/python3.13/site-packages/networkx/algorithms/tests/test_reciprocity.pytest_reciprocity_digraph(TestReciprocity.test_reciprocity_digraph   s1    ZZ()nnR(c!!!    c                     [         R                  " [        R                  5         [        R                  " 5       n[        R
                  " U5        S S S 5        g ! , (       d  f       g = f)N)pytestraisesr   NetworkXErrorr   overall_reciprocityr   r   s     r   $test_overall_reciprocity_empty_graph4TestReciprocity.test_overall_reciprocity_empty_graph   s9    ]]2++,B""2& -,,s   ,A
A(c                 ~    [         R                  " / SQ5      n[         R                  " USS/5      nSSS.nX#:X  d   eg )Nr   )r	      )r   r	   r   r	   g        UUUUUU?r   r
   )r   r   r   expected_reciprocitys       r   test_reciprocity_graph_nodes,TestReciprocity.test_reciprocity_graph_nodes   s=    ZZ01nnR!Q0#&+=>222r   c                 r    [         R                  " / SQ5      n[         R                  " US5      nUS:X  d   eg )Nr   r	   r    r
   r   s      r   test_reciprocity_graph_node+TestReciprocity.test_reciprocity_graph_node   s0    ZZ01nnR+0000r   c                     [         R                  " [        R                  5         [        R                  " S/5      nUR                  S5        [        R                  " US5        S S S 5        g ! , (       d  f       g = f)Nr      )r   r   r   r   r   add_noder   r   s     r   %test_reciprocity_graph_isolated_nodes5TestReciprocity.test_reciprocity_graph_isolated_nodes!   sI    ]]2++,VH%BKKNNN2q! -,,s   A A..
A< N)
__name__
__module____qualname____firstlineno__r   r   r"   r%   r*   __static_attributes__r,   r   r   r   r      s    "'31"r   r   )r   networkxr   r   r,   r   r   <module>r3      s     " "r   