o
    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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 tjt jdd t jd	dd
gdt j	d}W d    d S 1 sw   Y  d S )Ni      d   r      
         Directed Graph not supportedmatchcreate_using)
nx	LCF_graphis_isomorphicnullcycle_graphcomplete_bipartite_graphpytestraisesNetworkXErrorDiGraph)selfGabcutility_graph r!   X/var/www/vscode/kcb/lib/python3.10/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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 d	d
 | D ddg kscJ t |dkslJ t |dksuJ t 
 }t|ttdksJ | dksJ 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 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 dd
 | D ddg ks7J t |dksAJ t |dksKJ t  }t|ttdks\J | dkseJ dd
 | D ddg ksvJ t |dksJ t |dksJ t  }t|ttdksJ | dksJ 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 dd
 | D ddg ksJ t |dksJ t |dksJ t  }t|ttdksJ | dks"J tdd | D g d ks4J t |dks>J t |dksHJ t  }t|ttdksYJ | dksbJ td!d | D g d"kstJ t |dks~J t |dksJ t  }t|ttdksJ | dksJ 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  }t|ttd(ksJ | dksJ d)d
 | D d(dg ksJ t |dks'J t  }t|ttdks8J | dksAJ d*d
 | D ddg ksRJ t |dks\J t |dksfJ t  }t|ttdkswJ | d+ksJ d,d
 | D ddg ksJ t |dksJ t  }t|ttd%ksJ | d-ksJ 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 g d0ksJ t  }t|ttdksJ | dks J d1d
 | D g d2ks0J t |dks:J t |dksDJ t  }t|ttdksUJ | d3ks^J d4d
 | D ddg ksoJ t  }t|ttdksJ | dksJ d5d
 | D ddg ksJ t  }t|ttd6ksJ | d7ksJ d8d
 | D d6dg ksJ tjt j t jt j!d9 t jt j"d9}t|# t|# ksJ d S ):Nr	   c                 s       | ]\}}|V  qd S Nr!   .0ndr!   r!   r"   	<genexpr>,       zITestGeneratorsSmall.test_properties_named_small_graphs.<locals>.<genexpr>)r   r   r   r   r   r   r         c                 S      g | ]\}}|qS r!   r!   r&   r!   r!   r"   
<listcomp>3       zJTestGeneratorsSmall.test_properties_named_small_graphs.<locals>.<listcomp>      c                 S   r.   r!   r!   r&   r!   r!   r"   r/   :   r0         c                 S   r.   r!   r!   r&   r!   r!   r"   r/   A   r0   c                 s   r$   r%   r!   r&   r!   r!   r"   r*   E   r+   )r   r   r   r   r   c                 S   r.   r!   r!   r&   r!   r!   r"   r/   L   r0      c                 S   r.   r!   r!   r&   r!   r!   r"   r/   S   r0         c                 S   r.   r!   r!   r&   r!   r!   r"   r/   Z   r0   2      c                 S   r.   r!   r!   r&   r!   r!   r"   r/   a   r0      r
   c                 s   r$   r%   r!   r&   r!   r!   r"   r*   h   r+   )r   r   r   r   r   c                 s   r$   r%   r!   r&   r!   r!   r"   r*   o   r+   )r   r   r   r1   r1   c                 S   r.   r!   r!   r&   r!   r!   r"   r/   v   r0   )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   r1   r1   r	   r	   r
      c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0   c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0      c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0      c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0   c                 s   r$   r%   r!   r&   r!   r!   r"   r*      r+   )r   r   r   r   r   r   r   r1   c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0   )r   r   r   r   $   c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0   c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0   .   E   c                 S   r.   r!   r!   r&   r!   r!   r"   r/      r0   r   )$r   
bull_graph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   r   
MultiGraphedges)r   r   MGr!   r!   r"   "test_properties_named_small_graphs(   s   "   """""$$ $""""$ """"z6TestGeneratorsSmall.test_properties_named_small_graphsN)__name__
__module____qualname__r#   ra   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 )Nr   r   r   )r   r   r   r   )re   r   r!   r!   r"   'tests_raises_with_directed_create_using   s   "rf   )r   networkxr   (networkx.algorithms.isomorphism.isomorphr   r   
null_graphr   r   markparametrizerA   rI   rJ   rL   rQ   rR   rS   rT   rV   rX   r[   r]   r   MultiDiGraphrf   r!   r!   r!   r"   <module>   s8     *