o
    ]Zh                     @   s   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	d
 ZG dd de	ZG dd deZG dd deZG dd deZG dd deZG dd deZdS )    N   )BaseDiGraphTester)TestDiGraph)BaseGraphTester)	TestGraph)TestMultiDiGraph)TestMultiGraphc                     sl  G dd dt  G dd dt G dd dt G dd dt G d	d
 d
t tjtjtjtjfD ]} G  fddd| }| }t|j sMJ t|jsUJ |	d t|jd sdJ |
 rt|jspJ t|jsxJ t|jd sJ |dd | rt|jd d sJ t|jd d d sJ q2t|jd d sJ q2d S )Nc                   @      e Zd ZdS )ztest_factories.<locals>.mydict1N__name__
__module____qualname__ r   r   R/var/www/auris/lib/python3.10/site-packages/networkx/classes/tests/test_special.pymydict1       r   c                   @   r	   )ztest_factories.<locals>.mydict2Nr
   r   r   r   r   mydict2   r   r   c                   @   r	   )ztest_factories.<locals>.mydict3Nr
   r   r   r   r   mydict3   r   r   c                   @   r	   )ztest_factories.<locals>.mydict4Nr
   r   r   r   r   mydict4   r   r   c                   @   r	   )ztest_factories.<locals>.mydict5Nr
   r   r   r   r   mydict5   r   r   c                       s    e Zd Z ZZZZZdS )ztest_factories.<locals>.MyGraphN)r   r   r   Znode_dict_factoryZadjlist_outer_dict_factoryZadjlist_inner_dict_factoryZedge_key_dict_factoryedge_attr_dict_factoryr   r   r   r   r   r   r   r   MyGraph   s    r   r      r   )dictnxGraphDiGraph
MultiGraphMultiDiGraph
isinstance_node_adjadd_nodeZis_directed_pred_succZadd_edgeZis_multigraph)r   r   Gr   r   r   test_factories   s,   
r'   c                   @      e Zd Zdd ZdS )TestSpecialGraphc                 C   s   t |  tj| _d S N)
_TestGraphsetup_methodr   r   selfr   r   r   r,   6      
zTestSpecialGraph.setup_methodNr   r   r   r,   r   r   r   r   r)   5       r)   c                   @   r(   )TestThinGraphc                    s   ddi G  fd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dZdS )z+TestThinGraph.setup_method.<locals>.MyGraphc                        S r*   r   r-   Zall_edge_dictr   r   r   @      zBTestThinGraph.setup_method.<locals>.MyGraph.edge_attr_dict_factoryNr   r   r   r   r   r6   r   r   r   ?       r   r   r   r   r   r   r   r   r   r   r<   r;   r:   r   r   )r   r   k3adjk3edgesk3nodesK3r"   r!   )r.   r   ed1ed2ed3r   r6   r   r,   <   s    



zTestThinGraph.setup_methodNr0   r   r   r   r   r2   ;   r1   r2   c                   @   r(   )TestSpecialDiGraphc                 C      t |  tj| _d S r*   )_TestDiGraphr,   r   r   r   r-   r   r   r   r,   R   r/   zTestSpecialDiGraph.setup_methodNr0   r   r   r   r   rF   Q   r1   rF   c                   @   r(   )TestThinDiGraphc                    sN  ddi G  fd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 )Nr3   r   c                       r4   )z-TestThinDiGraph.setup_method.<locals>.MyGraphc                    r5   r*   r   r-   r6   r   r   r   \   r7   zDTestThinDiGraph.setup_method.<locals>.MyGraph.edge_attr_dict_factoryNr8   r   r6   r   r   r   [   r9   r   r:   r;   r<   r=   r>   r   r   )r   r   r   r?   r@   rA   rB   r%   r$   r!   ZP3)r.   r   rC   rD   rE   Zed4Zed5Zed6r   r6   r   r,   X   s.    



"

zTestThinDiGraph.setup_methodNr0   r   r   r   r   rI   W   r1   rI   c                   @   r(   )TestSpecialMultiGraphc                 C   rG   r*   )_TestMultiGraphr,   r   r   r   r-   r   r   r   r,   {   r/   z"TestSpecialMultiGraph.setup_methodNr0   r   r   r   r   rJ   z   r1   rJ   c                   @   r(   )TestSpecialMultiDiGraphc                 C   rG   r*   )_TestMultiDiGraphr,   r   r   r   r-   r   r   r   r,      r/   z$TestSpecialMultiDiGraph.setup_methodNr0   r   r   r   r   rL      r1   rL   )Znetworkxr   Ztest_digraphr   r   rH   Z
test_graphr   r   r+   Ztest_multidigraphr   rM   Ztest_multigraphr   rK   r'   r)   r2   rF   rI   rJ   rL   r   r   r   r   <module>   s    *#