o
    3ήc                     @   sP   d dl Z d dlmZmZ d dlmZ dd Zdd Zdd	 Zd
d Z	dd Z
dS )    N)GraphNetworkXError)asyn_fluidcc                  C   s^   t  } | d ttt| d ttt| d ttt| d | d ttt| d d S )Nahi   b   )r   add_nodepytestraisesr   r   )test r   Z/tmp/pip-target-vg8gfxp4/lib/python/networkx/algorithms/community/tests/test_asyn_fluid.pytest_exceptions   s   

r   c                  C   sD   t  } | d tdgh}t| d}dd |D }||ks J d S )Nr   r
   c                 S      h | ]}t |qS r   	frozenset.0cr   r   r   	<setcomp>       z#test_single_node.<locals>.<setcomp>)r   r   r   r   r   ground_truthcommunitiesresultr   r   r   test_single_node   s   

r   c                  C   sN   t  } | dd tdgtdgh}t| d}dd |D }||ks%J d S )Nr   r	      c                 S   r   r   r   r   r   r   r   r   '   r   z!test_two_nodes.<locals>.<setcomp>r   add_edger   r   r   r   r   r   test_two_nodes   s   
r"   c                  C   s   t  } | dd | dd | dd | dd | dd | dd | dd tg dtg dh}t| d	d
d}dd |D }||ksMJ d S )Nr   r	   r   def)r   r   r	   )r$   r#   r%   r      seedc                 S   r   r   r   r   r   r   r   r   ?   r   z.test_two_clique_communities.<locals>.<setcomp>r    r   r   r   r   test_two_clique_communities+   s   r)   c                  C   s  t  } | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | d	d
 | d	d | d	d | d
d | d
d | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | dd | d	d | dd | dd tg dtg dtg dtg dtg dh}t| ddd}dd |D }||ksJ d S )N1a1b1c1d2a2b2c2d3a3b3c3d4a4b4c4d5a5b5c5d)r*   r+   r,   r-   )r.   r/   r0   r1   )r2   r3   r4   r5   )r6   r7   r8   r9   )r:   r;   r<   r=      	   r'   c                 S   r   r   r   r   r   r   r   r      r   z(test_five_clique_ring.<locals>.<setcomp>r    r   r   r   r   test_five_clique_ringC   sZ   




r@   )r   networkxr   r   (networkx.algorithms.community.asyn_fluidr   r   r   r"   r)   r@   r   r   r   r   <module>   s    
