U
    ?h                     @   s   d dl Z d dlZd dlmZ eZe ZG dd dZe j	
dejejejejejejejejejejejejfe j	
dejejedgfdd	 ZdS )
    N)graph_could_be_isomorphicc                   @   s   e Zd Zdd Zdd ZdS )TestGeneratorsSmallc                 C   s   t dddgd}t|ts tt dddgd}t|ts@tt dddgd}t|ts`tdg dfdg dfdg dfdg dffD ],\}}}t |||}t|t |stqt d	dd
gd}t dd}t||std S )Ni      d   r      
         )nxZ	LCF_graphis_isomorphicnullAssertionErrorZcycle_graphZcomplete_bipartite_graph)selfGabcZutility_graph r   V/var/www/html/venv/lib/python3.8/site-packages/networkx/generators/tests/test_small.pytest__LCF_graph   s    .z#TestGeneratorsSmall.test__LCF_graphc                 C   s.
  t  }t|ttdks t| dks0ttdd | D dddddgksXtt |dksjtt 	|dks|tt 
 }t|ttdkst| dkstd	d
 | D ddg kstt |dkstt 	|dkstt  }t|ttdkst| dks$tdd
 | D ddg ksFtt |dksZtt 	|dksntt  }t|ttdkst| dkstdd
 | D ddg kstt  }t|ttdksttdd | D ddddgkstt |dks"tt 	|dks6tt  }t|ttdksXt| dksjtdd
 | D ddg kstt |dkstt 	|dkstt  }t|ttdkst| dkstdd
 | D ddg ks
tt |dkstt 	|dks2tt  }t|ttdksTt| dksftdd
 | D ddg kstt |dkstt 	|dkstt  }t|ttdkst| dkstdd
 | D ddg kstt |dkstt 	|dks.tt  }t|ttdksPt| dksbttdd | D dddddgkstt |dkstt 	|dkstt  }t|ttdkst| dksttdd | D dddddgkstt |dks&tt 	|dks:tt  }t|ttdks\t| dksntdd
 | D ddddddddddddgkstt |dkstt 	|dkstt  }t|ttd kst| dksttd!d | D ddddddddddg
ks2tt  }t|ttd"ksTt| dksftd#d
 | D d"dg kstt |dkstt  }t|ttdkst| dkstd$d
 | D ddg kstt |dkstt 	|dkstt  }t|ttdks<t| d%ksNtd&d
 | D ddg ksptt |dkstt  }t|ttd kst| d'kstd(d
 | D d dg kstt |dkstt 	|dkstt  }t|ttdks$t| d ks6ttd)d | D ddddddddgksftt  }t|ttdkst| dkstd*d
 | D ddddgkstt |dkstt 	|dkstt  }t|ttdk	st| d+k	std,d
 | D ddg k	s<tt  }t|ttdk	s^t| dk	sptd-d
 | D ddg k	stt  }t|ttd.k	st| d/k	std0d
 | D d.dg k	sttj t j!t jt j"d1 t jt j#d1}t|$ t|$ k
s*td S )2Nr	   c                 s   s   | ]\}}|V  qd S Nr   .0ndr   r   r   	<genexpr>)   s     zITestGeneratorsSmall.test_properties_named_small_graphs.<locals>.<genexpr>r   r   r         c                 S   s   g | ]\}}|qS r   r   r   r   r   r   
<listcomp>0   s     zJTestGeneratorsSmall.test_properties_named_small_graphs.<locals>.<listcomp>      c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    7   s           c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    >   s     c                 s   s   | ]\}}|V  qd S r   r   r   r   r   r   r   B   s     c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    I   s        c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    P   s           c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    W   s     2      c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    ^   s        r
   c                 s   s   | ]\}}|V  qd S r   r   r   r   r   r   r   e   s     c                 s   s   | ]\}}|V  qd S r   r   r   r   r   r   r   l   s     c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r    s   s     r   c                 s   s   | ]\}}|V  qd S r   r   r   r   r   r   r   z   s        c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s     c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s        c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s        c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s     c                 s   s   | ]\}}|V  qd S r   r   r   r   r   r   r      s     c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s     $   c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s     c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s     .   E   c                 S   s   g | ]\}}|qS r   r   r   r   r   r   r       s     create_using)%r   
bull_graphsortedlistranger   Znumber_of_edgesZdegreeZdiameterZradiuschvatal_graphcubical_graphZdesargues_graphdiamond_graphZdodecahedral_graphZfrucht_graphZheawood_graphZhoffman_singleton_graphhouse_graphhouse_x_graphicosahedral_graphkrackhardt_kite_graphZmoebius_kantor_graphoctahedral_graphZpappus_graphpetersen_graphZsedgewick_maze_graphZtetrahedral_graphtruncated_cube_graphZtruncated_tetrahedron_graphtutte_graphpytestraisesNetworkXErrorDiGraphZ
MultiGraphedges)r   r   ZMGr   r   r   "test_properties_named_small_graphs%   s    ( ""(""""**44""""0$"""z6TestGeneratorsSmall.test_properties_named_small_graphsN)__name__
__module____qualname__r   rG   r   r   r   r   r      s   r   fnr2   )r   r   c              	   C   s*   t jtjdd | |d W 5 Q R X d S )NzDirected Graph not supported)matchr1   )rB   rC   r   rD   )rK   r2   r   r   r   'tests_raises_with_directed_create_using   s    rM   )rB   Znetworkxr   Z(networkx.algorithms.isomorphism.isomorphr   r   Z
null_graphr   r   markZparametrizer3   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rE   ZMultiDiGraphrM   r   r   r   r   <module>   s6    ' 