
    \Mh                        d dl 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lmZ d	 Z G d
 de	          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          ZdS )    N   )BaseDiGraphTester)TestDiGraph)BaseGraphTester)	TestGraph)TestMultiDiGraph)TestMultiGraphc                  $    G d dt                      G d dt                      G d dt                      G d dt                      G d	 d
t                     t          j        t          j        t          j        t          j        fD ]{}  G fdd|           } |            }t          |j                  sJ t          |j                  sJ |	                    d           t          |j        d                   sJ |
                                rKt          |j                  sJ t          |j                  sJ t          |j        d                   sJ |                    dd           |                                rNt          |j        d         d                   sJ t          |j        d         d         d                   sJ Xt          |j        d         d                   sJ }d S )Nc                       e Zd ZdS )test_factories.<locals>.mydict1N__name__
__module____qualname__     c/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/networkx/classes/tests/test_special.pymydict1r              r   r   c                       e Zd ZdS )test_factories.<locals>.mydict2Nr   r   r   r   mydict2r      r   r   r   c                       e Zd ZdS )test_factories.<locals>.mydict3Nr   r   r   r   mydict3r      r   r   r   c                       e Zd ZdS )test_factories.<locals>.mydict4Nr   r   r   r   mydict4r      r   r   r   c                       e Zd ZdS )test_factories.<locals>.mydict5Nr   r   r   r   mydict5r       r   r   r!   c                   $    e Zd Z ZZZZZdS )test_factories.<locals>.MyGraphN)r   r   r   node_dict_factoryadjlist_outer_dict_factoryadjlist_inner_dict_factoryedge_key_dict_factoryedge_attr_dict_factory)r   r   r   r   r!   s   r   MyGraphr#      s/         ')0&)0&$+!%,"""r   r)   r      r   )dictnxGraphDiGraph
MultiGraphMultiDiGraph
isinstance_node_adjadd_nodeis_directed_pred_succadd_edgeis_multigraph)r-   r)   Gr   r   r   r   r!   s      @@@@@r   test_factoriesr;      s       $       $       $       $       $    (BJrG 5 5	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	-e 	- 	- 	- GII!'7+++++!&'*****	

1!&)W-----==?? 	3agw/////agw/////agaj'22222	

1a?? 	5afQilG44444afQil1ow777777afQilG444444/5 5r   c                       e Zd Zd ZdS )TestSpecialGraphc                 P    t          j        |            t          j        | _        d S N)
_TestGraphsetup_methodr,   r-   selfs    r   rA   zTestSpecialGraph.setup_method6   s     %%%X


r   Nr   r   r   rA   r   r   r   r=   r=   5   s#            r   r=   c                       e Zd Zd ZdS )TestThinGraphc                 p   ddi G fddt           j                  }|| _        }}}||d||d||dd| _        g d	| _        g d| _        |                                 | _        | j        | j        _        i | j        _        i | j        j        d
<   i | j        j        d<   i | j        j        d<   d S )Nweightr   c                       e Zd Z fdZdS )+TestThinGraph.setup_method.<locals>.MyGraphc                     S r?   r   rC   all_edge_dicts    r   r(   zBTestThinGraph.setup_method.<locals>.MyGraph.edge_attr_dict_factory@   	    $$r   Nr   r   r   r(   rM   s   r   r)   rJ   ?   .        % % % % % % %r   r)   r   r*   r   r*   r   r   r   r   r*   rT   rS   rR   r   r*   )r,   r-   k3adjk3edgesk3nodesK3r3   r2   )rC   r)   ed1ed2ed3rM   s        @r   rA   zTestThinGraph.setup_method<   s    !1	% 	% 	% 	% 	% 	% 	%bh 	% 	% 	% 
&}#S S))##.>.>ssCSCSTT
/// yy**,,zaaar   NrD   r   r   r   rF   rF   ;   s#            r   rF   c                       e Zd Zd ZdS )TestSpecialDiGraphc                 P    t          j        |            t          j        | _        d S r?   )_TestDiGraphrA   r,   r.   r-   rB   s    r   rA   zTestSpecialDiGraph.setup_methodR   s     !$'''Z


r   NrD   r   r   r   r_   r_   Q   s#                 r   r_   c                       e Zd Zd ZdS )TestThinDiGraphc                    ddi G fddt           j                  }|| _        }}}}}}||d||d||dd| _        g d	| _        g d| _        |                                 | _        | j        | j        _        ||d||d||dd| j        _        i | j        _	        i | j        j	        d
<   i | j        j	        d<   i | j        j	        d<   }}|                                 | _
        d|id|ii d| j
        _        i d
|id|id| j
        _        i | j
        _	        i | j
        j	        d
<   i | j
        j	        d<   i | j
        j	        d<   d S )NrH   r   c                       e Zd Z fdZdS )-TestThinDiGraph.setup_method.<locals>.MyGraphc                     S r?   r   rL   s    r   r(   zDTestThinDiGraph.setup_method.<locals>.MyGraph.edge_attr_dict_factory\   rN   r   NrO   rP   s   r   r)   rf   [   rQ   r   r)   rR   rS   rT   rU   rV   r   r*   )r,   r.   r-   rW   rX   rY   rZ   r7   r6   r2   P3)	rC   r)   r[   r\   r]   ed4ed5ed6rM   s	           @r   rA   zTestThinDiGraph.setup_methodX   s   !1	% 	% 	% 	% 	% 	% 	%bj 	% 	% 	% 
&}#S&}#S S))##.>.>ssCSCSTT
/// yy**,,
 #,,SS1A1A#RUFVFVWWaaa!=S**,,H!Sb99As8C99aaar   NrD   r   r   r   rc   rc   W   s#            r   rc   c                       e Zd Zd ZdS )TestSpecialMultiGraphc                 P    t          j        |            t          j        | _        d S r?   )_TestMultiGraphrA   r,   r/   r-   rB   s    r   rA   z"TestSpecialMultiGraph.setup_method{   s     $T***]


r   NrD   r   r   r   rm   rm   z   s#        # # # # #r   rm   c                       e Zd Zd ZdS )TestSpecialMultiDiGraphc                 P    t          j        |            t          j        | _        d S r?   )_TestMultiDiGraphrA   r,   r0   r-   rB   s    r   rA   z$TestSpecialMultiDiGraph.setup_method   s     &t,,,_


r   NrD   r   r   r   rq   rq      s#        % % % % %r   rq   )networkxr,   test_digraphr   r   ra   
test_graphr   r   r@   test_multidigraphr   rs   test_multigraphr	   ro   r;   r=   rF   r_   rc   rm   rq   r   r   r   <module>ry      s       + + + + + + 5 5 5 5 5 5 ' ' ' ' ' ' / / / / / / D D D D D D > > > > > >'5 '5 '5T    z       O   ,                        '      F# # # # #O # # #% % % % %/ % % % % %r   