o
    3ήc                     @   s,   d dl Zd dlm  mZ G dd dZdS )    Nc                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )TestMinEdgeCoverz>Tests for :func:`networkx.algorithms.bipartite.min_edge_cover`c                 C   s    t  }t|t ksJ d S )N)nxGraph	bipartitemin_edge_coversetselfG r   X/tmp/pip-target-vg8gfxp4/lib/python/networkx/algorithms/bipartite/tests/test_covering.pytest_empty_graph   s   z!TestMinEdgeCover.test_empty_graphc                 C   s.   t  }|dd t|ddhksJ d S )Nr      )r   r   )r   r   )r   r   add_edger   r   r   r   r   r   test_graph_single_edge   s   z'TestMinEdgeCover.test_graph_single_edgec                 C   sh   t  }|jg ddd |jg ddd |g d t|}t ||s*J t|dks2J d S N)r            r   )r   )abcr   ))r   r   )r   r   )r   r   )r   r   )r   r   )r   r      )r   r   add_nodes_fromadd_edges_fromr   r   is_edge_coverlenr	   r
   	min_coverr   r   r   test_bipartite_default   s   
z'TestMinEdgeCover.test_bipartite_defaultc                 C   sl   t  }|jg ddd |jg ddd |g d t|tj}t ||s,J t|dks4J d S r   )	r   r   r   r   r   r   eppstein_matchingr   r   r   r   r   r   test_bipartite_explicit   s   z(TestMinEdgeCover.test_bipartite_explicitN)__name__
__module____qualname____doc__r   r   r   r!   r   r   r   r   r      s    	r   )networkxr   networkx.algorithms.bipartite
algorithmsr   r   r   r   r   r   <module>   s    