o
    ˷e                     @   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d ZdS )TestGeneratorsSmallc                 C   sb   dddddgg dg ddgdggg}t |}t|t  s!J d|d	< tjt jt j|d
 d S )Nadjacencylistz
Bull Graph         )   r      )r   r   r   erroneouslistr   )graph_description)nxmake_small_graphis_isomorphic
bull_graphpytestraisesNetworkXError)selfdG r   [/var/www/ideatree/venv/lib/python3.10/site-packages/networkx/generators/tests/test_small.pytest_make_small_graph   s
   &
z)TestGeneratorsSmall.test_make_small_graphc                 C   s   t dddgd}t|tsJ t dddgd}t|ts J t dddgd}t|ts0J dg dfdg dfdg dfdg dffD ]\}}}t |||}t|t |sXJ qBt d	dd
gd}t dd}t||soJ d S )Nir   r   d   r   r   
   r      )r   	LCF_graphr   nullcycle_graphcomplete_bipartite_graph)r   r   abcutility_graphr   r   r   test__LCF_graph   s   .z#TestGeneratorsSmall.test__LCF_graphc                 C   s
  t  }t|ttdksJ | dksJ tdd | D g dks)J t |dks2J t |dks;J t 	 }t|ttdksKJ | dksSJ td	d | D dd
g kseJ t |dksnJ t |dkswJ t 
 }t|ttdksJ | dksJ tdd | D ddg ksJ t |dksJ t |dksJ t  }t|ttdksJ | dksJ tdd | D ddg ksJ t  }t|ttd
ksJ tdd | D g dksJ t |dksJ t |dksJ t  }t|ttdks#J | dks,J tdd | D ddg ks?J t |dksIJ t |dksSJ t  }t|ttdksdJ | dksmJ tdd | D ddg ksJ t |d
ksJ t |dksJ t  }t|ttdksJ | dksJ tdd | D ddg ksJ t |dksJ t |dksJ t  }t|ttdksJ | dksJ tdd | D ddg ksJ t |dksJ t |dksJ t  }t|ttdks'J | dks0J tdd | D g dksBJ t |dksLJ t |dksVJ t  }t|ttdksgJ | dkspJ td d | D g d!ksJ t |dksJ t |dksJ t  }t|ttdksJ | dksJ td"d | D g d#ksJ t |dksJ t |dksJ t  }t|ttd$ksJ | dksJ td%d | D g d&ksJ t  }t|ttd'ksJ | dksJ td(d | D d'dg ks/J t |d
ks9J t  }t|ttdksJJ | dksSJ td)d | D dd
g ksfJ t |dkspJ t |dkszJ t  }t|ttdksJ | d*ksJ td+d | D ddg ksJ t |d
ksJ t  }t|ttd$ksJ | d,ksJ td-d | D d$dg ksJ t |dksJ t |dksJ t  }t|ttdksJ | d$ksJ td.d | D g d/ksJ t  }t|ttd
ks/J | dks8J td0d | D g d1ksJJ t |dksTJ t |dks^J t  }t|ttdksoJ | d2ksxJ td3d | D ddg ksJ t  }t|ttdksJ | dksJ td4d | D ddg ksJ t  }t|ttd5ksJ | d6ksJ td7d | D d5dg ksJ tjt j t jt j!d8 t jt j"d8}t|# t|# ksJ d S )9Nr   c                 s       | ]\}}|V  qd S Nr   .0nr   r   r   r   	<genexpr>2       zITestGeneratorsSmall.test_properties_named_small_graphs.<locals>.<genexpr>)r   r   r   r   r   r   r         c                 s   r&   r'   r   r(   r   r   r   r+   9   r,   r	      c                 s   r&   r'   r   r(   r   r   r   r+   @   r,         c                 s   r&   r'   r   r(   r   r   r   r+   G   r,   c                 s   r&   r'   r   r(   r   r   r   r+   K   r,   )r   r   r   r   r   c                 s   r&   r'   r   r(   r   r   r   r+   R   r,      c                 s   r&   r'   r   r(   r   r   r   r+   Y   r,         c                 s   r&   r'   r   r(   r   r   r   r+   `   r,   2      c                 s   r&   r'   r   r(   r   r   r   r+   g   r,      r   c                 s   r&   r'   r   r(   r   r   r   r+   n   r,   )r   r   r   r   r   c                 s   r&   r'   r   r(   r   r   r   r+   u   r,   )r   r   r   r	   r	   c                 s   r&   r'   r   r(   r   r   r   r+   |   r,   )r   r   r   r   r   r   r   r   r   r   r   r   r   c                 s   r&   r'   r   r(   r   r   r   r+      r,   )
r   r   r   r   r   r	   r	   r   r   r      c                 s   r&   r'   r   r(   r   r   r   r+      r,   c                 s   r&   r'   r   r(   r   r   r   r+      r,      c                 s   r&   r'   r   r(   r   r   r   r+      r,      c                 s   r&   r'   r   r(   r   r   r   r+      r,   c                 s   r&   r'   r   r(   r   r   r   r+      r,   )r   r   r   r   r   r   r   r	   c                 s   r&   r'   r   r(   r   r   r   r+      r,   )r   r   r   r   $   c                 s   r&   r'   r   r(   r   r   r   r+      r,   c                 s   r&   r'   r   r(   r   r   r   r+      r,   .   E   c                 s   r&   r'   r   r(   r   r   r   r+      r,   create_using)$r   r   sortedlistrangenumber_of_edgesdegreediameterradiuschvatal_graphcubical_graphdesargues_graphdiamond_graphdodecahedral_graphfrucht_graphheawood_graphhoffman_singleton_graphhouse_graphhouse_x_graphicosahedral_graphkrackhardt_kite_graphmoebius_kantor_graphoctahedral_graphpappus_graphpetersen_graphsedgewick_maze_graphtetrahedral_graphtruncated_cube_graphtruncated_tetrahedron_graphtutte_graphr   r   r   DiGraph
MultiGraphedges)r   r   MGr   r   r   "test_properties_named_small_graphs.   s   "$$$"&&&&$$$$&&&&$$&&&"z6TestGeneratorsSmall.test_properties_named_small_graphsN)__name__
__module____qualname__r   r%   r`   r   r   r   r   r      s    	r   fnr?   )r   r   c                 C   s@   t jtjdd | |d W d    d S 1 sw   Y  d S )NzDirected Graph not supported)matchr>   )r   r   r   r   )rd   r?   r   r   r   'tests_raises_with_directed_create_using   s   "rf   )r   networkxr   (networkx.algorithms.isomorphism.isomorphr   r   
null_graphr   r   markparametrizer   rG   rH   rJ   rO   rP   rQ   rR   rT   rV   rY   r[   r\   MultiDiGraphrf   r   r   r   r   <module>   s8     0