Ë
    D^(h�S  ã                   óà   — d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl	Z	d dl
Zd dlmZmZ  G d„ d«      Zed„ «       Z G d	„ d
«      Ze	j$                  j'                  dg df«      d„ «       Zy)é    N)Úliteral_eval)Úcontextmanager)Údedent)Úliteral_destringizerÚliteral_stringizerc                   óÊ   — e Zd Zed„ «       Zd„ Zd„ Zd„ Zd„ Zd„ Z	e
j                  j                  ddef«      d	„ «       Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)Ú	TestGraphc                 ó   — d| _         y )Na2  Creator "me"
Version "xx"
graph [
 comment "This is a sample graph"
 directed 1
 IsPlanar 1
 pos  [ x 0 y 1 ]
 node [
   id 1
   label "Node 1"
   pos [ x 1 y 1 ]
 ]
 node [
    id 2
    pos [ x 1 y 2 ]
    label "Node 2"
    ]
  node [
    id 3
    label "Node 3"
    pos [ x 1 y 3 ]
  ]
  edge [
    source 1
    target 2
    label "Edge from node 1 to node 2"
    color [line "blue" thickness 3]

  ]
  edge [
    source 2
    target 3
    label "Edge from node 2 to node 3"
  ]
  edge [
    source 3
    target 1
    label "Edge from node 3 to node 1"
  ]
]
)Úsimple_data)Úclss    ú_/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/networkx/readwrite/tests/test_gml.pyÚsetup_classzTestGraph.setup_class   s   € ð(ˆ�ó    c                 ó2   — d}t        j                  |«       y )Nas  
Creator "Cytoscape"
Version 1.0
graph   [
    node    [
        root_index  -3
        id  -3
        graphics    [
            x   -96.0
            y   -67.0
            w   40.0
            h   40.0
            fill    "#ff9999"
            type    "ellipse"
            outline "#666666"
            outline_width   1.5
        ]
        label   "node2"
    ]
    node    [
        root_index  -2
        id  -2
        graphics    [
            x   63.0
            y   37.0
            w   40.0
            h   40.0
            fill    "#ff9999"
            type    "ellipse"
            outline "#666666"
            outline_width   1.5
        ]
        label   "node1"
    ]
    node    [
        root_index  -1
        id  -1
        graphics    [
            x   -31.0
            y   -17.0
            w   40.0
            h   40.0
            fill    "#ff9999"
            type    "ellipse"
            outline "#666666"
            outline_width   1.5
        ]
        label   "node0"
    ]
    edge    [
        root_index  -2
        target  -2
        source  -1
        graphics    [
            width   1.5
            fill    "#0000ff"
            type    "line"
            Line    [
            ]
            source_arrow    0
            target_arrow    3
        ]
        label   "DirectedEdge"
    ]
    edge    [
        root_index  -1
        target  -1
        source  -3
        graphics    [
            width   1.5
            fill    "#0000ff"
            type    "line"
            Line    [
            ]
            source_arrow    0
            target_arrow    3
        ]
        label   "DirectedEdge"
    ]
]
)ÚnxÚ	parse_gml)ÚselfÚcytoscape_examples     r   Útest_parse_gml_cytoscape_bugz&TestGraph.test_parse_gml_cytoscape_bug;   s   € ðPÐôb 	�‰Ð&Õ'r   c                 ó2  — t        j                  | j                  d¬«      }t        |j	                  «       «      g d¢k(  sJ ‚t        |j                  «       «      g d¢k(  sJ ‚t        |j                  d¬«      «      ddd	d
dœddœfddddifddddifgk(  sJ ‚y )NÚlabel©r   ©úNode 1úNode 2úNode 3))r   r   )r   r   )r   r   T©Údatar   r   Úblueé   )ÚlineÚ	thicknesszEdge from node 1 to node 2)Úcolorr   r   zEdge from node 2 to node 3zEdge from node 3 to node 1)r   r   r   ÚsortedÚnodesÚedges©r   ÚGs     r   Útest_parse_gmlzTestGraph.test_parse_gml�   sº   € Ü�L‰L˜×)Ñ)°Ô9ˆÜ�a—g‘g“iÓ Ò$BÒBÐBÐBÜ�a—g‘g“iÓ ò %
ò 
ð 	
ð 
ô �a—g‘g 4�gÓ(Ó)àØà&,¸1Ñ=Ø9ñðð �x 'Ð+GÐ!HÐIØ�x 'Ð+GÐ!HÐIð.
ò 
ð 	
ñ 
r   c                 óÚ  — |dz  }t        |d«      5 }|j                  | j                  «       d d d «       t        j                  |d¬«      }t        j
                  | j                  d¬«      }t        |j                  d¬«      «      t        |j                  d¬«      «      k(  sJ ‚t        |j                  d¬«      «      t        |j                  d¬«      «      k(  sJ ‚y # 1 sw Y   Œ´xY w)Nútest.gmlÚwr   r   Tr   )	ÚopenÚwriter   r   Úread_gmlr   r$   r%   r&   )r   Útmp_pathÚfnameÚfhÚGinr(   s         r   Útest_read_gmlzTestGraph.test_read_gml¦   sÁ   € Ø˜:Ñ%ˆÜ�%˜Óð 	' Ø�H‰H�T×%Ñ%Ô&÷	'ä�k‰k˜% wÔ/ˆÜ�L‰L˜×)Ñ)°Ô9ˆÜ�a—g‘g 4�gÓ(Ó)¬V°C·I±IÀ4°IÓ4HÓ-IÒIÐIÐIÜ�a—g‘g 4�gÓ(Ó)¬V°C·I±IÀ4°IÓ4HÓ-IÒIÐIÑI÷	'ð 	'ús   ’C!Ã!C*c                 ó´   — d}t        j                  «       }|j                  d«       dj                  t        j                  |t
        ¬«      «      }||k(  sJ ‚y )Nz0graph [
  node [
    id 0
    label "1203"
  ]
]i³  ú
©Ú
stringizer)r   ÚGraphÚadd_nodeÚjoinÚgenerate_gmlr   )r   Úanswerr(   r   s       r   Útest_labels_are_stringsz!TestGraph.test_labels_are_strings¯   sH   € ðˆô �H‰H‹JˆØ	�
‰
�4ÔØ�y‰yœŸ™¨Ô7IÔJÓKˆØ�vŠ~Ð‰~r   c                 óÜ   — d}t        j                  |j                  d«      «      }|j                  d«       t	        j
                  t        j                  t        j                  |d¬«       y )Nzì
graph
[
        label   ""
        directed        1
        node
        [
                id      0
                label   "same"
        ]
        node
        [
                id      1
                label   "same"
        ]
]
zUTF-8r   r   r   )	ÚioÚBytesIOÚencodeÚseekÚpytestÚraisesr   ÚNetworkXErrorr/   )r   r   r2   s      r   Útest_relabel_duplicatez TestGraph.test_relabel_duplicate¼   sI   € ðˆô" �Z‰Z˜Ÿ™ GÓ,Ó-ˆØ
�‰�Œ
Ü�‰”b×&Ñ&¬¯©°R¸wÖGr   r8   Nc                 ó®   — t        j                  «       }|j                  dd«       dj                  t        j                  ||¬«      «      }d}||k(  sJ ‚y )N)r   é   )rI   r   r6   r7   z€graph [
  node [
    id 0
    label "(0,1)"
  ]
  node [
    id 1
    label "(1,0)"
  ]
  edge [
    source 0
    target 1
  ]
])r   r9   Úadd_edger;   r<   )r   r8   r(   r   r=   s        r   Útest_tuplelabelszTestGraph.test_tuplelabelsÒ   sK   € ô �H‰H‹JˆØ	�
‰
�6˜6Ô"Ø�y‰yœŸ™¨°zÔBÓCˆðˆð �vŠ~Ð‰~r   c                 ó~  — t        j                  d«      }d|_        dt        d«      z   }||j                  d   d<   t        |dz  d«      5 }t        j                  ||«       |j                  d«       |j                  «       j                  «       j                  d	«      }d d d «       d
}|k(  sJ ‚y # 1 sw Y   ŒxY w)NrI   zpath_graph(1)z*This is "quoted" and this is a copyright: é©   r   Údemor+   úw+bÚasciizˆgraph [
  name "path_graph(1)"
  node [
    id 0
    label "0"
    demo "This is &#34;quoted&#34; and this is a copyright: &#169;"
  ]
])r   Ú
path_graphÚnameÚchrr%   r-   Ú	write_gmlrC   ÚreadÚstripÚdecode)r   r0   r(   ÚattrÚfobjr   r=   s          r   Útest_quoteszTestGraph.test_quotesé   s¬   € ô �M‰M˜!ÓˆØ ˆŒØ;¼cÀ#»hÑFˆØ!ˆ�‰�‰
�6ÑÜ�(˜ZÑ'¨Ó/ð 	7°4Ü�L‰L˜˜DÔ!Ø�I‰I�aŒLà—9‘9“;×$Ñ$Ó&×-Ñ-¨gÓ6ˆD÷		7ð
ˆð �vŠ~Ð‰~÷	7ð 	7ús   ÁAB3Â3B<c                 ól  — dt        d«      z   }t        j                  «       }|j                  |«       t	        |dz  d«      5 }t        j
                  ||«       |j                  d«       |j                  «       j                  «       j                  d«      }d d d «       d}|k(  sJ ‚y # 1 sw Y   ŒxY w)NÚnoderM   r+   rO   r   rP   z6graph [
  node [
    id 0
    label "node&#169;"
  ]
])
rS   r   r9   r:   r-   rT   rC   rU   rV   rW   ©r   r0   r\   r(   rY   r   r=   s          r   Útest_unicode_nodezTestGraph.test_unicode_nodeÿ   sš   € Øœ˜C›Ñ ˆÜ�H‰H‹JˆØ	�
‰
�4ÔÜ�(˜ZÑ'¨Ó/ð 	7°4Ü�L‰L˜˜DÔ!Ø�I‰I�aŒLà—9‘9“;×$Ñ$Ó&×-Ñ-¨gÓ6ˆD÷		7ð
ˆð �vŠ~Ð‰~÷	7ð 	7ús   ÁAB*Â*B3c                 óT  — d}t        j                  «       }|j                  |«       t        |dz  d«      5 }t        j                  ||«       |j                  d«       |j                  «       j                  «       j                  d«      }d d d «       d}|k(  sJ ‚y # 1 sw Y   ŒxY w)Ng      ð?r+   rO   r   rP   z/graph [
  node [
    id 0
    label "1.0"
  ]
])	r   r9   r:   r-   rT   rC   rU   rV   rW   r]   s          r   Útest_float_labelzTestGraph.test_float_label  s‘   € ØˆÜ�H‰H‹JˆØ	�
‰
�4ÔÜ�(˜ZÑ'¨Ó/ð 	7°4Ü�L‰L˜˜DÔ!Ø�I‰I�aŒLà—9‘9“;×$Ñ$Ó&×-Ñ-¨gÓ6ˆD÷		7ð
ˆð �vŠ~Ð‰~÷	7ð 	7ús   ·ABÂB'c                 óâ  — t        d«      t        d«      t        d«      g}	 dd l}||j                  |j                  |j                  dz  gz  }t        j                  t        |«      «      }t        t        |«      «      }t        j                  ||d«       t        |j                  «      }t        |«      D ��ci c]  \  }}||   |“Œ }}}t        j                  ||d«       t        |dz  d	«      5 }	t        j                  ||	«       |	j!                  d«       |	j#                  «       j%                  «       j'                  d
«      }
d}|
|k(  sJ ‚|	j!                  d«       t        j(                  |	«      }t        |«      D ]º  \  }}|j*                  t-        |«         d   }t/        j0                  |«      rt/        j0                  |«      s	J ‚||k(  sJ ‚||   }t-        |d   «      t-        |d   «      f}|j                  |   d   }t/        j0                  |«      rt/        j0                  |«      rŒ²J ‚||k(  rŒºJ ‚ 	 d d d «       y # t        $ r	 ||z  }Y �Œw xY wc c}}w # 1 sw Y   y xY w)NÚnanz+infz-infr   éÿÿÿÿÚ	nodefloatÚ	edgefloatr+   rO   rP   a«  graph [
  node [
    id 0
    label "0"
    nodefloat NAN
  ]
  node [
    id 1
    label "1"
    nodefloat +INF
  ]
  node [
    id 2
    label "2"
    nodefloat -INF
  ]
  node [
    id 3
    label "3"
    nodefloat NAN
  ]
  node [
    id 4
    label "4"
    nodefloat +INF
  ]
  node [
    id 5
    label "5"
    nodefloat -INF
  ]
  edge [
    source 0
    target 1
    edgefloat NAN
  ]
  edge [
    source 0
    target 5
    edgefloat +INF
  ]
  edge [
    source 1
    target 2
    edgefloat -INF
  ]
  edge [
    source 2
    target 3
    edgefloat NAN
  ]
  edge [
    source 3
    target 4
    edgefloat +INF
  ]
  edge [
    source 4
    target 5
    edgefloat -INF
  ]
]rI   )ÚfloatÚnumpyrb   ÚinfÚImportErrorr   Úcycle_graphÚlenÚdictÚ	enumerateÚset_node_attributesÚlistr&   Úset_edge_attributesr-   rT   rC   rU   rV   rW   r/   r%   ÚstrÚmathÚisnan)r   r0   Úspecial_floatsÚnpr(   Úattrsr&   ÚiÚvaluerY   r   r=   ÚgraphÚindxÚ
node_valueÚedgeÚstring_edgeÚ
edge_values                     r   Útest_special_float_labelz"TestGraph.test_special_float_label!  s1  € Ü ›,¬¨f«´u¸V³}ÐEˆð	-Ûà˜rŸv™v r§v¡v¨r¯v©v¸©{Ð;Ñ;ˆNô �N‰Nœ3˜~Ó.Ó/ˆÜ”Y˜~Ó.Ó/ˆÜ
×Ñ˜q %¨Ô5Ü�Q—W‘W“ˆÜ1:¸>Ó1J×K¡X Q¨��q‘˜5‘ÐKˆÑKÜ
×Ñ˜q %¨Ô5ä�(˜ZÑ'¨Ó/ð T	/°4Ü�L‰L˜˜DÔ!Ø�I‰I�aŒLà—9‘9“;×$Ñ$Ó&×-Ñ-¨gÓ6ˆDð=ˆFð| ˜6’>Ð!�>à�I‰I�aŒLÜ—K‘K Ó%ˆEÜ(¨Ó8ò /‘��eØ"Ÿ[™[¬¨T«Ñ3°KÑ@�
Ü—:‘:˜eÔ$ÜŸ:™: jÔ1Ð1Ð1à%¨Ò.Ð.Ð.à˜T‘{�Ü" 4¨¡7›|¬S°°a±«\Ð:�Ø"Ÿ[™[¨Ñ5°kÑB�
Ü—:‘:˜eÔ$ÜŸ:™: jÕ1Ð1Ð1à%¨Ó.Ð.Ð.ñ/÷OT	/ð T	/øô ò 	-Ø˜nÑ,‹Nð	-üó L÷T	/ð T	/ús0   ¢-I
 Â;IÃ4E I%È5I%È=I%É
IÉIÉ%I.c                 óÂ   — t        j                  d«      }d|j                  d   k(  sJ ‚t        j                  d«      }d|j                  k(  sJ ‚d|j                  vsJ ‚y )Nz*graph [ name "x" node [ id 0 label "x" ] ]ÚxrR   z!graph [ node [ id 0 label "x" ] ]Ú )r   r   ry   rR   r'   s     r   Ú	test_namezTestGraph.test_name‡  sX   € Ü�L‰LÐEÓFˆØ�a—g‘g˜f‘oÒ%Ð%Ð%Ü�L‰LÐ<Ó=ˆØ�Q—V‘VŠ|Ðˆ|Ø˜QŸW™WÑ$Ð$Ñ$r   c           	      óð  — dD ]ñ  }dD ]ê  }d}|�|dt        t        |«      «      z   z  }|�|dt        t        |«      «      z   z  }|dz  }|dz  }|dz  }t        j                  |«      }t	        |«      |j                  «       k(  sJ ‚t	        |«      |j                  «       k(  sJ ‚d}|d	u r|d
z  }|d	u r|dz  }|dz  }|r|dz  }|dz  }|dj                  t        j                  |«      «      k(  rŒêJ ‚ Œó y )N)NFTzgraph [z
 directed z multigraph z node [ id 0 label "0" ]z edge [ source 0 target 0 ]z ]zgraph [
Tz  directed 1
z  multigraph 1
zG  node [
    id 0
    label "0"
  ]
  edge [
    source 0
    target 0
z
    key 0
z  ]
]r6   )	rq   Úintr   r   ÚboolÚis_directedÚis_multigraphr;   r<   )r   ÚdirectedÚ
multigraphÚgmlr(   s        r   Útest_graph_typeszTestGraph.test_graph_typesŽ  s2  € Ø+ò 	<ˆHØ1ò <�
Ø�ØÐ'Ø˜<¬#¬c°(«mÓ*<Ñ<Ñ<�CØÐ)Ø˜>¬C´°J³Ó,@Ñ@Ñ@�CØÐ1Ñ1�ØÐ4Ñ4�Ø�t‘�Ü—L‘L Ó%�Ü˜H“~¨¯©«Ò8Ð8Ð8Ü˜JÓ'¨1¯?©?Ó+<Ò<Ð<Ð<Ø!�Ø˜tÑ#ØÐ+Ñ+�CØ Ñ%ØÐ-Ñ-�CØð ñ �ñ Ø˜=Ñ(�CØ�x‘�Ø˜dŸi™i¬¯©¸Ó(:Ó;Ó;Ð;Ð;ñ9<ñ	<r   c                 ó‚  — ddddddddt        d	«      d
idgg}|j                  t        d«      «       |j                  t        d«      «       t        j                  «       }||_        ||j                  d<   |j                  ddd|i¬«       |j                  ddd|¬«       dj                  t        j                  |t        ¬«      «      }t        j                  |t        ¬«      }||j
                  k(  sJ ‚||dœ|j                  k(  sJ ‚t        |j                  d¬«      «      ddd|idœfgk(  sJ ‚t        |j!                  d¬«      «      ddd|dœfgk(  sJ ‚t        j                  «       }d|j                  d<   t        j                  t        j                  |«      t        ¬«      }|j                  d   dk(  sJ ‚y )NTFl      Fµx:^V gœÉF"ã¦ØÆú'z"&&amp;&&#34;")ó   ýúéDD  )rI   é   )r’   Ú3iDD z{2.3j, 1 - 2.3j, ()}r   r   rc   )r…   r   g      À)rf   r   r6   r7   ©Údestringizer)rR   r   r   úfrozenset([1, 2, 3]))rS   Úappendr   r   r9   rR   ry   r:   rJ   r;   r<   r   r   r   ro   r%   r&   )r   r   r(   r‹   s       r   Útest_data_typeszTestGraph.test_data_types®  s“  € àØØØØØØ˜&¤# f£+¨vÐ6¸ÐAð
ˆð 	�‰”C˜“LÔ!Ø�‰”LÐ!7Ó8Ô9Ü�H‰H‹JˆØˆŒØˆ�‰�‰Ø	�
‰
�1˜" F¨D >ˆ
Ô2Ø	�
‰
�1�a˜t¨$ˆ
Ô/Ø�i‰iœŸ™¨Ô6HÔIÓJˆÜ�L‰L˜Ô+?Ô@ˆØ�q—v‘vŠ~Ðˆ~Ø dÑ+¨q¯w©wÒ6Ð6Ð6Ü�A—G‘G �GÓ&Ó'¨Q¸ÀVÈTÀNÑ0SÐ,TÐ+UÒUÐUÐUÜ�A—G‘G �GÓ&Ó'¨Q°¸TÈ4Ñ3PÐ,QÐ+RÒRÐRÐRÜ�H‰H‹JˆØ0ˆ�‰�‰Ü�L‰LœŸ™¨Ó+¼,ÔGˆØ�w‰w�v‰Ð"8Ò8Ð8Ñ8r   c                 óÜ   — d}t        j                  |«      }dt        d«      z   dz   |j                  k(  sJ ‚dj	                  t        j
                  |«      «      }d}d|z   dz   }||k(  sJ ‚y )	NzTgraph [
  name "&amp;&#34;&#xf;&#x4444;&#1234567890;&#x1234567890abcdef;&unknown;"
]z&"r‘   z*&#1234567890;&#x1234567890abcdef;&unknown;r6   z##1234567890;&#38;#x1234567890abcdefz,graph [
  name "&#38;&#34;&#15;&#17476;&#38;z;&#38;unknown;"
])r   r   rS   rR   r;   r<   )r   r‹   r(   Úalnur=   s        r   Útest_escape_unescapezTestGraph.test_escape_unescapeÊ  s‰   € ðˆô �L‰L˜Óˆà”s˜6“{Ñ"Ð%QÑQØ�v‰vòð	
ðð �i‰iœŸ™¨Ó*Ó+ˆØ4ˆð(àñðñð 	ð ˜Š}Ð‰}r   c                 ó^  — t        j                  t        t        d«       t        j                  t        t        d«       t        j                  t        t        t        «       t        j                  t        t        t        g d¢«      «       t        j                  t        t        t        «       t        |dz  d«      5 }|j                  t        j                  dz   «       |j                  d«       t        j                  t        j                  t        j                  |«       d d d «       d„ } |d	d
g«        |d«        |d«        |d«        |d«        |d«        |d«        |d«        |d«        |d«        |d«        |d«        |d«       t        j                  dd¬«        |d«        |d«        |d«        |d«       t        j                  d«        |d«        |d «        |d!«       t        j                  d"«       t        j                  d#«       t        j                  d$«        |d%«       t        j                  d&«       t        j                  d'«       t        j                  d(«        |d)«       d*„ }t        j                  «       }d+|j                   d+<    ||«       t        j                  «       }d+|j                   d,<    ||«       t        j                  «       }t        g d¢«      |j                   d-<    ||t        ¬.«       y # 1 sw Y   �ŒÿxY w)/Nú(r–   ©rI   r’   r    r+   rO   s   graph[]r   c                 ój   — t        j                  t        j                  t        j                  | «       y ©N)rD   rE   r   rF   r   )r‹   s    r   Úassert_parse_errorz5TestGraph.test_exceptions.<locals>.assert_parse_erroré  s   € Ü�M‰Mœ"×*Ñ*¬B¯L©L¸#Õ>r   z	graph [

ú]r‚   z
Creator ""Ú0zgraph ]zgraph [ 1 ]zgraph [ 1.E+2 ]zgraph [ "A" ]zgraph [ ] graph ]zgraph [ ] graph [ ]zgraph [ data [1, 2, 3] ]zgraph [ node [ ] ]zgraph [ node [ id 0 ] ]zgraph [ node [ id "a" ] ]Úidr   z5graph [ node [ id 0 label 0 ] node [ id 0 label 1 ] ]z5graph [ node [ id 0 label 0 ] node [ id 1 label 0 ] ]z(graph [ node [ id 0 label 0 ] edge [ ] ]z1graph [ node [ id 0 label 0 ] edge [ source 0 ] ]z9graph [edge [ source 0 target 0 ] node [ id 0 label 0 ] ]z:graph [ node [ id 0 label 0 ] edge [ source 1 target 0 ] ]z:graph [ node [ id 0 label 0 ] edge [ source 0 target 1 ] ]zkgraph [ node [ id 0 label 0 ] node [ id 1 label 1 ] edge [ source 0 target 1 ] edge [ source 1 target 0 ] ]zvgraph [ node [ id 0 label 0 ] node [ id 1 label 1 ] edge [ source 0 target 1 ] edge [ source 1 target 0 ] directed 1 ]zwgraph [ node [ id 0 label 0 ] node [ id 1 label 1 ] edge [ source 0 target 1 ] edge [ source 0 target 1 ]multigraph 1 ]z}graph [ node [ id 0 label 0 ] node [ id 1 label 1 ] edge [ source 0 target 1 key 0 ] edge [ source 0 target 1 ]multigraph 1 ]zƒgraph [ node [ id 0 label 0 ] node [ id 1 label 1 ] edge [ source 0 target 1 key 0 ] edge [ source 0 target 1 key 0 ]multigraph 1 ]zŽgraph [ node [ id 0 label 0 ] node [ id 1 label 1 ] edge [ source 0 target 1 key 0 ] edge [ source 1 target 0 key 0 ]directed 1 multigraph 1 ]z9graph [edge [ source a target a ] node [ id a label b ] ]z˜graph [ node [ id n42 label 0 ] node [ id x43 label 1 ]edge [ source n42 target x43 key 0 ]edge [ source x43 target n42 key 0 ]directed 1 multigraph 1 ]uE   graph [edge [ source 'äˆ€' target 'äˆ€' ] node [ id 'äˆ€' label b ] ]c                  óX   ‡ ‡— t        j                  t        j                  ˆ ˆfd„«       y )Nc                  ó@   •— t        t        j                  ‰ i ‰¤Ž«      S r    )ro   r   r<   ©ÚargsÚkwargss   €€r   ú<lambda>zJTestGraph.test_exceptions.<locals>.assert_generate_error.<locals>.<lambda>.  s   ø€ ¬$¬r¯©ÀÐ/OÈÑ/OÓ*P€ r   )rD   rE   r   rF   r§   s   ``r   Úassert_generate_errorz8TestGraph.test_exceptions.<locals>.assert_generate_error,  s   ù€ Ü�M‰MÜ× Ñ Ô"Põr   r    r“   r   r7   )rD   rE   Ú
ValueErrorr   r   Ú	frozensetr-   r.   ÚcodecsÚBOM_UTF8rC   r   rF   r/   r   r9   ry   )r   r0   Úfr¡   r«   r(   s         r   Útest_exceptionszTestGraph.test_exceptionsÞ  s“  € Ü�‰”jÔ"6¸Ô<Ü�‰”jÔ"6Ð8NÔOÜ�‰”jÔ"6Ô8LÔMÜ�‰”jÔ"4´iÂ	Ó6JÔKÜ�‰”jÔ"4Ô6HÔIÜ�(˜ZÑ'¨Ó/ð 	<°1Ø�G‰G”F—O‘O jÑ0Ô1Ø�F‰F�1ŒIÜ�M‰Mœ"×*Ñ*¬B¯K©K¸Ô;÷	<ò
	?ñ 	˜M¨3Ð/Ô0Ù˜2ÔÙ˜<Ô(Ù˜3ÔÙ˜9Ô%Ù˜=Ô)ÙÐ,Ô-Ù˜?Ô+ÙÐ.Ô/ÙÐ0Ô1ÙÐ5Ô6ÙÐ/Ô0ÙÐ4Ô5Ü
�‰Ð0¸Õ=ÙÐRÔSÙÐRÔSÙÐEÔFÙÐNÔOÜ
�‰ÐPÔQÙÐWÔXÙÐWÔXÙðFô	
ô 	�‰ðô	
ô
 	�‰ðô	
ô
 	�‰ðô	
ñ
 	ðô	
ô
 	�‰ð(ô	
ô 	�‰ÐPÔQÜ
�‰ð(ô	
ñ 	ð/ô	
ò
	ô
 �H‰H‹JˆØˆ�‰�‰
Ù˜aÔ Ü�H‰H‹JˆØˆ�‰�‰Ù˜aÔ Ü�H‰H‹JˆÜ#¢IÓ.ˆ�‰�‰Ù˜aÔ,>Ö?÷k	<ñ 	<ús   Â>A'L"Ì"L,c                 óø  — t        j                  | j                  d¬«      }t        |j                  «      g d¢k(  sJ ‚t        |j                  «      D �cg c]  }|j                  |   d   ‘Œ }}|g d¢k(  sJ ‚t        j                  | j                  d ¬«      }t        |j                  «      g d¢k(  sJ ‚t        |j                  «      D �cg c]  }|j                  |   d   ‘Œ }}|g d¢k(  sJ ‚y c c}w c c}w )Nr¤   r   rž   r   r   )r   r   r   r$   r%   )r   r(   ÚnÚlabelss       r   Útest_label_kwargzTestGraph.test_label_kwarg;  sÔ   € Ü�L‰L˜×)Ñ)°Ô6ˆÜ�a—g‘g‹¢)Ò+Ð+Ð+Ü/5°a·g±g«Ö?¨!�!—'‘'˜!‘*˜WÓ%Ð?ˆÐ?ØÒ7Ò7Ð7Ð7ä�L‰L˜×)Ñ)°Ô6ˆÜ�a—g‘g‹¢)Ò+Ð+Ð+Ü/5°a·g±g«Ö?¨!�!—'‘'˜!‘*˜WÓ%Ð?ˆÐ?ØÒ7Ò7Ð7Ñ7ùò @ùò
 @s   ÁC2ÃC7c                 ót  — t        j                  «       }ddddddddœ} |j                  di |¤Ž |d
z  }t        j                  ||«       t        j                  |«      }|j
                  d	   j                  «       D ]8  \  }}|dk(  s|dk(  rt        |«      t        k(  rŒ#J ‚t        |«      t        k(  rŒ8J ‚ y )Nlýÿÿÿ    i   €éüÿÿÿr   é   iÿÿÿl        )ÚtoosmallÚsmallÚmed1Úmed2Úmed3ÚbigÚtoobigÚNoder+   r¹   r¿   )rÀ   )
r   r9   r:   rT   r/   r%   ÚitemsÚtyperq   r…   )r   r0   r(   Únumbersr1   ÚG2rX   rx   s           r   Útest_outofrange_integersz"TestGraph.test_outofrange_integersF  s¾   € ô �H‰H‹Jˆð 'ØØØØØØñ
ˆð 	ˆ�
‰
Ñ%˜WÒ%à˜:Ñ%ˆÜ
�‰�Q˜Ôä�[‰[˜ÓˆØŸ8™8 FÑ+×1Ñ1Ó3ò 	*‰KˆD�%Ø�zÒ! T¨XÒ%5Ü˜E“{¤cÓ)Ð)Ð)ä˜E“{¤cÓ)Ð)Ð)ñ		*r   c                 ó`   — d}t        j                  |«      }|j                  d   dddœk(  sJ ‚y )Nz’
graph
[
    node
    [
	    id 0
	    label "multiline node"
	    label2 "multiline1
    multiline2
    multiline3"
	    alt_name "id 0"
    ]
]
zmultiline nodez multiline1 multiline2 multiline3zid 0)Úlabel2Úalt_name)r   r   r%   )r   Úmultiline_exampler(   s      r   Útest_multilinezTestGraph.test_multilinea  sB   € ðÐô �L‰LÐ*Ó+ˆØ�w‰wÐ'Ñ(Ø8Øñ-
ò 
ð 	
ñ 
r   )Ú__name__Ú
__module__Ú__qualname__Úclassmethodr   r   r)   r4   r>   rG   rD   ÚmarkÚparametrizer   rK   rZ   r^   r`   r   rƒ   rŒ   r˜   r›   r±   rµ   rÅ   rÊ   © r   r   r	   r	      s    „ Øñ)ó ð)òVS(òj
ò,JòòHð, ‡[�[×Ñ˜\¨DÐ2DÐ+EÓFñó Gðò,ò,ò"ò"d/òL%ò<ò@9ò8ò([@òz	8ò*ó6
r   r	   c               #   ó^   K  — t        j                  «       } | –— | j                  d«       y ­w)Nr   )r@   rA   rC   )Ú_file_handles    r   Ú	byte_filerÔ   x  s%   è ø€ ä—:‘:“<€LØ
ÒØ×Ñ�aÕùs   ‚+-c                   ó$   — e Zd Zd„ Zd„ Zd„ Zd„ Zy)ÚTestPropertyListsc                 ó  — t        j                  «       }|j                  dg d¢¬«       t        «       5 }t        j                  ||«       d d d «       j                  «       j                  «       }|t        d«      k(  sJ ‚y # 1 sw Y   Œ8xY w)NÚn1)Úelementr   rI   ç      @TF©Ú
propertiesa7              graph [
              node [
                id 0
                label "n1"
                properties "element"
                properties 0
                properties 1
                properties 2.5
                properties 1
                properties 0
              ]
            ]
        ©r   r9   r:   rÔ   rT   rU   rW   r   ©r   Úgr°   Úresults       r   Ú3test_writing_graph_with_multi_element_property_listzETestPropertyLists.test_writing_graph_with_multi_element_property_list€  sx   € Ü�H‰H‹JˆØ	�
‰
�4Ò$Gˆ
ÔHÜ‹[ð 	˜AÜ�L‰L˜˜AÔ÷	à—‘“—‘Ó"ˆàœðó
ò 
ð 	
ñ 
÷		ð 	ús   ´BÂBc                 ó  — t        j                  «       }|j                  ddg¬«       t        «       5 }t        j                  ||«       d d d «       j                  «       j                  «       }|t        d«      k(  sJ ‚y # 1 sw Y   Œ8xY w)NrØ   rÙ   rÛ   zÖ            graph [
              node [
                id 0
                label "n1"
                properties "_networkx_list_start"
                properties "element"
              ]
            ]
        rÝ   rÞ   s       r   Ú1test_writing_graph_with_one_element_property_listzCTestPropertyLists.test_writing_graph_with_one_element_property_list˜  sy   € Ü�H‰H‹JˆØ	�
‰
�4 Y Kˆ
Ô0Ü‹[ð 	˜AÜ�L‰L˜˜AÔ÷	à—‘“—‘Ó"ˆàœð	ó
ò 
ð 	
ñ 
÷		ð 	ús   ³BÂB
c                 ó  — t        «       5 }|j                  t        d«      j                  d«      «       |j	                  d«       t        j                  |«      }d d d «       j                  d¬«      d   dg d¢ik(  sJ ‚y # 1 sw Y   Œ(xY w)	Na  
              graph [
                node [
                  id 0
                  label "n1"
                  properties "element"
                  properties 0
                  properties 1
                  properties 2.5
                ]
              ]
            rP   r   Tr   rØ   rÜ   )rÙ   r   rI   rÚ   ©rÔ   r.   r   rB   rC   r   r/   r%   ©r   r°   ry   s      r   Ú%test_reading_graph_with_list_propertyz7TestPropertyLists.test_reading_graph_with_list_property¬  s‚   € Ü‹[ð 	#˜AØ�G‰GÜðó÷ ‘&˜“/ôð  �F‰F�1ŒIÜ—K‘K “NˆE÷%	#ð& �{‰{ ˆ{Ó% dÑ+°Ò>TÐ/UÒUÐUÑU÷'	#ð 	#ús   ‹ABÂBc                 ó  — t        «       5 }|j                  t        d«      j                  d«      «       |j	                  d«       t        j                  |«      }d d d «       j                  d¬«      d   ddgik(  sJ ‚y # 1 sw Y   Œ'xY w)	Nzë
              graph [
                node [
                  id 0
                  label "n1"
                  properties "_networkx_list_start"
                  properties "element"
                ]
              ]
            rP   r   Tr   rØ   rÜ   rÙ   rå   ræ   s      r   Ú4test_reading_graph_with_single_element_list_propertyzFTestPropertyLists.test_reading_graph_with_single_element_list_propertyÂ  sƒ   € Ü‹[ð 	#˜AØ�G‰GÜð	ó÷ ‘&˜“/ôð �F‰F�1ŒIÜ—K‘K “NˆE÷!	#ð" �{‰{ ˆ{Ó% dÑ+°¸y¸kÐ/JÒJÐJÑJ÷#	#ð 	#ús   ‹ABÂB
N)rË   rÌ   rÍ   rá   rã   rç   ré   rÑ   r   r   rÖ   rÖ     s   „ ò
ò0
ò(Vó,Kr   rÖ   ÚcollrÑ   c                 ó2  — t        j                  d«      }| |j                  d   d<   t        j                  «       }t        j
                  ||«       |j                  d«       t        j                  |«      }|j                  d   d   | k(  sJ ‚t        j                  |dddœ«      }t         j                  j                  ||«      sJ ‚|j                  d«       t        j                  |t        ¬«      }t         j                  j                  ||«      sJ ‚y )Nr’   r   Útestr£   rI   )r£   Ú1r”   )r   rQ   r%   r@   rA   rT   rC   r/   Úrelabel_nodesÚutilsÚgraphs_equalr…   )rê   r(   r°   ÚHs       r   Útest_stringize_empty_list_tuplerò   ×  sØ   € ä
�‰�aÓ€AØ€A‡G�GˆA�JˆvÑÜ
�
‰
‹€AÜ‡L�L��AÔØ‡F�Fˆ1„IÜ
�‰�A‹€AØ�7‰7�3‰<˜Ñ 4Ò'Ð'Ð'ô 	×Ñ˜ !¨!Ñ,Ó-€AÜ�8‰8× Ñ   AÔ&Ð&Ð&ð ‡F�Fˆ1„IÜ
�‰�A¤CÔ(€AÜ�8‰8× Ñ   AÔ&Ð&Ñ&r   )r®   r@   rr   Úastr   Ú
contextlibr   Útextwrapr   rD   Únetworkxr   Únetworkx.readwrite.gmlr   r   r	   rÔ   rÖ   rÏ   rÐ   rò   rÑ   r   r   ú<module>rø      sy   ðÛ Û 	Û Ý Ý %Ý ã ã ß K÷g	
ñ g	
ðT ñó ð÷UKñ UKðp ‡�×Ñ˜ " b Ó*ñ'ó +ñ'r   