o
    ñhõ ã                   @   s–   d dl Z d dlZd dlZd dlmZ d dlmZmZ G dd„ dƒZ	G dd„ de	ƒZ
G dd	„ d	e	ƒZG d
d„ deƒZdd„ Zdd„ Zdd„ Zdd„ ZdS )é    N)ÚGraphMLWriter)Úedges_equalÚnodes_equalc                   @   s   e Zd Zedd„ ƒZdS )ÚBaseGraphMLc                 C   s4  d| _ t ¡ | _| j d¡ | jjdddd | j dd¡ | j g d¢¡ t | j  	d¡¡| _
d	| _tjd
d| _ddi| jjd< | jjddd | jjddd | jjddd | j d¡ | jjddd | jjddddd | jjddddd | jjddddd | jjdddd | jjdddd | jjdddd | jjddd d!d t | j 	d¡¡| _d"| _tjd
d| _d#d$d$d%d%d&d'œ| jjd< | j d¡ | j d¡ | jjdddd t | j 	d¡¡| _d(| _t ¡ | _| jjd)d*d+d, | jjd-d.d+d, | jjd)d-d/d0 t | j 	d¡¡}|| _d1| _t ¡ | _| jjdd2d3 | jjddd3 | jjddd2d3 | jjdddd3 t | j 	d¡¡}|| _d4| _t ¡ | _| j d¡ | jjdddd | j d5d6g¡ t | j 	d¡¡}|| _d7| _t ¡ | _| j d¡ | jjdddd | jjdddd | jjdddd t | j 	d¡¡}|| _d8| _ t ¡ | _!| j! d¡ | j!jdddd | j!jdddd | j!jdddd t | j  	d¡¡}|| _"d9| _#t ¡ | _$| j$ d¡ | j$ dd¡ | j$jdddd | j$jdddd t | j# 	d¡¡}|| _%d S ):Na  <?xml version="1.0" encoding="UTF-8"?>
<!-- This file was written by the JAVA GraphML Library.-->
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G" edgedefault="directed">
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <node id="n3"/>
    <node id="n4"/>
    <node id="n5"/>
    <node id="n6"/>
    <node id="n7"/>
    <node id="n8"/>
    <node id="n9"/>
    <node id="n10"/>
    <edge id="foo" source="n0" target="n2"/>
    <edge source="n1" target="n2"/>
    <edge source="n2" target="n3"/>
    <edge source="n3" target="n5"/>
    <edge source="n3" target="n4"/>
    <edge source="n4" target="n6"/>
    <edge source="n6" target="n5"/>
    <edge source="n5" target="n7"/>
    <edge source="n6" target="n8"/>
    <edge source="n8" target="n7"/>
    <edge source="n8" target="n9"/>
  </graph>
</graphml>Ún10Ún0Ún2Úfoo©Úid)
©Ún1r   ©r   Ún3)r   Ún5)r   Ún4)r   Ún6)r   r   )r   Ún7)r   Ún8)r   r   )r   Ún9úUTF-8a  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
        http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key id="d0" for="node" attr.name="color" attr.type="string">
    <default>yellow</default>
  </key>
  <key id="d1" for="edge" attr.name="weight" attr.type="double"/>
  <graph id="G" edgedefault="directed">
    <node id="n0">
      <data key="d0">green</data>
    </node>
    <node id="n1"/>
    <node id="n2">
      <data key="d0">blue</data>
    </node>
    <node id="n3">
      <data key="d0">red</data>
    </node>
    <node id="n4"/>
    <node id="n5">
      <data key="d0">turquoise</data>
    </node>
    <edge id="e0" source="n0" target="n2">
      <data key="d1">1.0</data>
    </edge>
    <edge id="e1" source="n0" target="n1">
      <data key="d1">1.0</data>
    </edge>
    <edge id="e2" source="n1" target="n3">
      <data key="d1">2.0</data>
    </edge>
    <edge id="e3" source="n3" target="n2"/>
    <edge id="e4" source="n2" target="n4"/>
    <edge id="e5" source="n3" target="n5"/>
    <edge id="e6" source="n5" target="n4">
      <data key="d1">1.1</data>
    </edge>
  </graph>
</graphml>
ÚGÚcolorÚyellowÚnode_defaultÚgreen)r   Úbluer   Úredr   r   Ú	turquoiseÚe0g      ð?)r   Úweightr   Úe1Úe2g       @Úe3Úe4Úe5Úe6çš™™™™™ñ?a’  <?xml version="1.0" encoding="UTF-8"?>
        <graphml xmlns="http://graphml.graphdrawing.org/xmlns"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
                http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
          <key id="d0" for="node" attr.name="boolean_attribute" attr.type="boolean"><default>false</default></key>
          <key id="d1" for="node" attr.name="int_attribute" attr.type="int"><default>0</default></key>
          <key id="d2" for="node" attr.name="long_attribute" attr.type="long"><default>0</default></key>
          <key id="d3" for="node" attr.name="float_attribute" attr.type="float"><default>0.0</default></key>
          <key id="d4" for="node" attr.name="double_attribute" attr.type="double"><default>0.0</default></key>
          <key id="d5" for="node" attr.name="string_attribute" attr.type="string"><default>Foo</default></key>
          <graph id="G" edgedefault="directed">
            <node id="n0"/>
            <node id="n1"/>
            <edge id="e0" source="n0" target="n1"/>
          </graph>
        </graphml>
        Fr   g        ÚFoo)Úboolean_attributeÚint_attributeÚlong_attributeÚfloat_attributeÚdouble_attributeÚstring_attributeaV  <?xml version='1.0' encoding='utf-8'?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key id="edge_prop" for="edge" attr.name="edge_prop" attr.type="string"/>
  <key id="prop2" for="node" attr.name="prop2" attr.type="string"/>
  <key id="prop1" for="node" attr.name="prop1" attr.type="string"/>
  <graph edgedefault="directed">
    <node id="0">
      <data key="prop1">val1</data>
      <data key="prop2">val2</data>
    </node>
    <node id="1">
      <data key="prop1">val_one</data>
      <data key="prop2">val2</data>
    </node>
    <edge source="0" target="1">
      <data key="edge_prop">edge_value</data>
    </edge>
  </graph>
</graphml>
Ú0Úval1Úval2)Úprop1Úprop2Ú1Úval_oneÚ
edge_value)Ú	edge_propaC  <?xml version='1.0' encoding='utf-8'?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key attr.name="weight" attr.type="double" for="node" id="d1" />
  <key attr.name="weight" attr.type="double" for="edge" id="d0" />
  <graph edgedefault="directed">
    <node id="n0">
      <data key="d1">1</data>
    </node>
    <node id="n1">
      <data key="d1">2.0</data>
    </node>
    <edge source="n0" target="n1">
      <data key="d0">1</data>
    </edge>
    <edge source="n1" target="n0">
      <data key="d0">k</data>
    </edge>
    <edge source="n1" target="n1">
      <data key="d0">1.0</data>
    </edge>
  </graph>
</graphml>
é   ©r    a  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G">
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <node id="n10"/>
    <edge id="foo" source="n0" target="n2"/>
    <edge source="n1" target="n2"/>
    <edge source="n2" target="n3"/>
  </graph>
</graphml>r   r   a  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G">
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <node id="n10"/>
    <edge id="e0" source="n0" target="n2"/>
    <edge id="e1" source="n1" target="n2"/>
    <edge id="e2" source="n2" target="n1"/>
  </graph>
</graphml>a  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G">
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <node id="n10"/>
    <edge id="e0" source="n0" target="n2"/>
    <edge id="e1" source="n1" target="n2"/>
    <edge id="e2" source="n2" target="n3"/>
  </graph>
</graphml>a  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G">
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <node id="n10"/>
    <edge source="n0" target="n2"/>
    <edge id="e1" source="n1" target="n2"/>
    <edge id="e2" source="n2" target="n1"/>
  </graph>
</graphml>)&Úsimple_directed_dataÚnxÚDiGraphÚsimple_directed_graphÚadd_nodeÚadd_edgeÚadd_edges_fromÚioÚBytesIOÚencodeÚsimple_directed_fhÚattribute_dataÚattribute_graphÚgraphÚattribute_fhÚnode_attribute_default_dataÚnode_attribute_default_graphÚnode_attribute_default_fhÚattribute_named_key_ids_dataÚattribute_named_key_ids_graphÚattribute_named_key_ids_fhÚattribute_numeric_type_dataÚattribute_numeric_type_graphÚattribute_numeric_type_fhÚsimple_undirected_dataÚGraphÚsimple_undirected_graphÚsimple_undirected_fhÚundirected_multigraph_dataÚ
MultiGraphÚundirected_multigraphÚundirected_multigraph_fhÚ'undirected_multigraph_no_multiedge_dataÚ"undirected_multigraph_no_multiedgeÚ%undirected_multigraph_no_multiedge_fhÚ'multigraph_only_ids_for_multiedges_dataÚ"multigraph_only_ids_for_multiedgesÚ%multigraph_only_ids_for_multiedges_fh)ÚclsÚfh© rb   úY/var/www/vscode/kcb/lib/python3.10/site-packages/networkx/readwrite/tests/test_graphml.pyÚsetup_class   s¬   
ÿ*ú
ÿ






zBaseGraphML.setup_classN)Ú__name__Ú
__module__Ú__qualname__Úclassmethodrd   rb   rb   rb   rc   r   
   s    r   c                   @   sœ   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%S )&ÚTestReadGraphMLc                 C   sæ   | j }t | j¡}t| ¡ ƒt| ¡ ƒksJ ‚t| ¡ ƒt| ¡ ƒks%J ‚t|jddƒt|jddƒks7J ‚| j d¡ t | j	¡}t| ¡ ƒt| ¡ ƒksQJ ‚t| ¡ ƒt| ¡ ƒks_J ‚t|jddƒt|jddƒksqJ ‚d S ©NT©Údatar   )
r=   r;   Úread_graphmlrD   ÚsortedÚnodesÚedgesÚseekÚparse_graphmlr:   ©Úselfr   ÚHÚPGrb   rb   rc   Ú!test_read_simple_directed_graphml:  s   $(z1TestReadGraphML.test_read_simple_directed_graphmlc                 C   ó†   | j }t | j¡}t| ¡ | ¡ ƒsJ ‚t| ¡ | ¡ ƒsJ ‚| j d¡ t 	| j
¡}t| ¡ | ¡ ƒs6J ‚t| ¡ | ¡ ƒsAJ ‚d S ©Nr   )rT   r;   rm   rU   r   ro   r   rp   rq   rr   rR   rs   rb   rb   rc   Ú#test_read_simple_undirected_graphmlG  ó   z3TestReadGraphML.test_read_simple_undirected_graphmlc                 C   rx   ry   )rX   r;   rm   rY   r   ro   r   rp   rq   rr   rV   rs   rb   rb   rc   Ú'test_read_undirected_multigraph_graphmlR  r{   z7TestReadGraphML.test_read_undirected_multigraph_graphmlc                 C   rx   ry   )r[   r;   rm   r\   r   ro   r   rp   rq   rr   rZ   rs   rb   rb   rc   Ú4test_read_undirected_multigraph_no_multiedge_graphml]  r{   zDTestReadGraphML.test_read_undirected_multigraph_no_multiedge_graphmlc                 C   rx   ry   )r^   r;   rm   r_   r   ro   r   rp   rq   rr   r]   rs   rb   rb   rc   Ú?test_read_undirected_multigraph_only_ids_for_multiedges_graphmlh  r{   zOTestReadGraphML.test_read_undirected_multigraph_only_ids_for_multiedges_graphmlc                 C   sð   | j }t | j¡}t| d¡t|jddƒƒsJ ‚t|jddƒ}t|jddƒ}t||ƒD ]
\}}||ks8J ‚q.| j 	d¡ t 
| j¡}t| d¡ƒt|jddƒksVJ ‚t|jddƒ}t|jddƒ}t||ƒD ]
\}}||ksuJ ‚qkd S rj   )rF   r;   rm   rH   r   ro   rn   rp   Úziprq   rr   rE   )rt   r   ru   ÚgeÚheÚaÚbrv   rb   rb   rc   Útest_read_attribute_graphmls  s    "ÿz+TestReadGraphML.test_read_attribute_graphmlc                 C   s.   | j }t | j¡}|jd |jd ksJ ‚d S )Nr   )rJ   r;   rm   rK   rG   )rt   r   ru   rb   rb   rc   Ú#test_node_default_attribute_graphml„  s   z3TestReadGraphML.test_node_default_attribute_graphmlc                 C   ó<   d}t  | d¡¡}t tjtj|¡ t tjtj|¡ d S )NaÛ  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G">
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <edge source="n0" target="n1"/>
    <edge source="n1" target="n2" directed='true'/>
  </graph>
</graphml>r   ©	rA   rB   rC   ÚpytestÚraisesr;   ÚNetworkXErrorrm   rr   ©rt   Úsra   rb   rb   rc   Ú test_directed_edge_in_undirected‰  ó   z0TestReadGraphML.test_directed_edge_in_undirectedc                 C   r†   )Naó  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G" edgedefault='directed'>
    <node id="n0"/>
    <node id="n1"/>
    <node id="n2"/>
    <edge source="n0" target="n1"/>
    <edge source="n1" target="n2" directed='false'/>
  </graph>
</graphml>r   r‡   r‹   rb   rb   rc   Ú test_undirected_edge_in_directed›  rŽ   z0TestReadGraphML.test_undirected_edge_in_directedc                 C   r†   )Naô  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key id="d0" for="node" attr.name="color" attr.type="string">
    <default>yellow</default>
  </key>
  <key id="d1" for="edge" attr.name="weight" attr.type="double"/>
  <graph id="G" edgedefault="directed">
    <node id="n0">
      <data key="d0">green</data>
    </node>
    <node id="n1"/>
    <node id="n2">
      <data key="d0">blue</data>
    </node>
    <edge id="e0" source="n0" target="n2">
      <data key="d2">1.0</data>
    </edge>
  </graph>
</graphml>
r   r‡   r‹   rb   rb   rc   Útest_key_raise­  s   zTestReadGraphML.test_key_raisec                 C   r†   )Na5  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key id="d0" for="node" attr.name="color" attr.type="string">
    <default>yellow</default>
  </key>
  <key id="d1" for="edge" attr.name="weight" attr.type="double"/>
  <graph id="G" edgedefault="directed">
    <node id="n0">
      <data key="d0">green</data>
    </node>
    <node id="n1"/>
    <node id="n2">
      <data key="d0">blue</data>
    </node>
    <hyperedge id="e0" source="n0" target="n2">
       <endpoint node="n0"/>
       <endpoint node="n1"/>
       <endpoint node="n2"/>
    </hyperedge>
  </graph>
</graphml>
r   r‡   r‹   rb   rb   rc   Útest_hyperedge_raiseÉ  s   z$TestReadGraphML.test_hyperedge_raisec                 C   sn   d}t  | d¡¡}t |¡}ddg}t|jddƒ|ksJ ‚| d¡ t |¡}t|jddƒ|ks5J ‚d S )Naß  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G" edgedefault="directed">
    <node id="n0"/>
    <node id="n1"/>
    <edge id="e0" source="n0" target="n1"/>
    <edge id="e1" source="n0" target="n1"/>
  </graph>
</graphml>
r   )r   r   r   )r   r   r!   T©Úkeysr   )	rA   rB   rC   r;   rm   rn   rp   rq   rr   ©rt   rŒ   ra   r   Úexpectedru   rb   rb   rc   Útest_multigraph_keysç  s   


z$TestReadGraphML.test_multigraph_keysc                 C   sH  t  ¡ }| d¡ | d¡ | dddddifddddifdddd	d
œfdddddifdddddifdddddd
œfg¡ t ¡ }t  ||¡ | d¡ t j|t	d}t
|jddd|jdddƒsdJ ‚|j|jkslJ ‚dd„ |j ¡ D ƒ}| d¡ t j|ttd}||jksŠJ ‚| d¡ | ¡ }t j|ttd}||jks¢J ‚dS )zf
        Test that data and keys of edges are preserved on consequent
        write and reads
        r8   é   )r8   r—   ÚkeyÚ	data_key1r   Údata_id2Ú	data_key3Údata_id3)r˜   r   ég   Ú	data_key4éh   Údata_id5éi   Ú	data_key6Údata_id7r   ©Ú	node_typeT)rl   r“   c                 S   ó(   i | ]\}}t |ƒd d„ | ¡ D ƒ“qS )c                 S   r¦   )c                 S   s   i | ]	\}}t |ƒ|“qS rb   ©Ústr)Ú.0ÚekeyÚddrb   rb   rc   Ú
<dictcomp>  s    zWTestReadGraphML.test_preserve_multi_edge_data.<locals>.<dictcomp>.<dictcomp>.<dictcomp>©r¨   Úitems)r©   ÚnbrÚkey_dictrb   rb   rc   r¬     s    ÿÿzLTestReadGraphML.test_preserve_multi_edge_data.<locals>.<dictcomp>.<dictcomp>r­   )r©   ÚnodeÚnbr_dictrb   rb   rc   r¬     s    üþÿzATestReadGraphML.test_preserve_multi_edge_data.<locals>.<dictcomp>)r¥   Úedge_key_typeN)r;   rW   r>   r@   rA   rB   Úwrite_graphmlrq   rm   Úintr   rp   Ú_adjr®   r¨   Úreadrr   )rt   r   ra   ru   ÚGadjÚHHÚ	string_fhrb   rb   rc   Útest_preserve_multi_edge_dataþ  s:   

öÿ
"û

z-TestReadGraphML.test_preserve_multi_edge_datac                 C   sÊ  d}t  | d¡¡}tj|dd}t| ¡ ƒdgksJ ‚|jdddd	s&J ‚|jd d
 dks1J ‚|jd d
 dks<J ‚|jd d
 dksGJ ‚|jd d dksRJ ‚|jd d dks]J ‚|jd d dkshJ ‚|jd d dkssJ ‚| 	d¡ t |¡}t| ¡ ƒdgksˆJ ‚|d d d dks”J ‚|jd d
 dksŸJ ‚|jd d
 dksªJ ‚|jd d
 dksµJ ‚|jd d dksÀJ ‚|jd d dksËJ ‚|jd d dksÖJ ‚|jd d dksáJ ‚tj
|dd}t| ¡ ƒdgksóJ ‚|jdddd	sýJ ‚|jd d
 dks	J ‚|jd d
 dksJ ‚|jd d
 dks!J ‚t 
|¡}t| ¡ ƒdgks2J ‚|d d d dks?J ‚|jd d
 dksKJ ‚|jd d
 dksWJ ‚|jd d
 dkscJ ‚d S )NaI  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:y="http://www.yworks.com/xml/graphml"
         xmlns:yed="http://www.yworks.com/xml/yed/3"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <!--Created by yFiles for Java 2.7-->
  <key for="graphml" id="d0" yfiles.type="resources"/>
  <key attr.name="url" attr.type="string" for="node" id="d1"/>
  <key attr.name="description" attr.type="string" for="node" id="d2"/>
  <key for="node" id="d3" yfiles.type="nodegraphics"/>
  <key attr.name="Description" attr.type="string" for="graph" id="d4">
    <default/>
  </key>
  <key attr.name="url" attr.type="string" for="edge" id="d5"/>
  <key attr.name="description" attr.type="string" for="edge" id="d6"/>
  <key for="edge" id="d7" yfiles.type="edgegraphics"/>
  <graph edgedefault="directed" id="G">
    <node id="n0">
      <data key="d3">
        <y:ShapeNode>
          <y:Geometry height="30.0" width="30.0" x="125.0" y="100.0"/>
          <y:Fill color="#FFCC00" transparent="false"/>
          <y:BorderStyle color="#000000" type="line" width="1.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content"
           borderDistance="0.0" fontFamily="Dialog" fontSize="13"
           fontStyle="plain" hasBackgroundColor="false" hasLineColor="false"
           height="19.1328125" modelName="internal" modelPosition="c"
           textColor="#000000" visible="true" width="12.27099609375"
           x="8.864501953125" y="5.43359375">1</y:NodeLabel>
          <y:Shape type="rectangle"/>
        </y:ShapeNode>
      </data>
    </node>
    <node id="n1">
      <data key="d3">
        <y:ShapeNode>
          <y:Geometry height="30.0" width="30.0" x="183.0" y="205.0"/>
          <y:Fill color="#FFCC00" transparent="false"/>
          <y:BorderStyle color="#000000" type="line" width="1.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content"
          borderDistance="0.0" fontFamily="Dialog" fontSize="13"
          fontStyle="plain" hasBackgroundColor="false" hasLineColor="false"
          height="19.1328125" modelName="internal" modelPosition="c"
          textColor="#000000" visible="true" width="12.27099609375"
          x="8.864501953125" y="5.43359375">2</y:NodeLabel>
          <y:Shape type="rectangle"/>
        </y:ShapeNode>
      </data>
    </node>
    <node id="n2">
      <data key="d6" xml:space="preserve"><![CDATA[description
line1
line2]]></data>
      <data key="d3">
        <y:GenericNode configuration="com.yworks.flowchart.terminator">
          <y:Geometry height="40.0" width="80.0" x="950.0" y="286.0"/>
          <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
          <y:BorderStyle color="#000000" type="line" width="1.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content"
          fontFamily="Dialog" fontSize="12" fontStyle="plain"
          hasBackgroundColor="false" hasLineColor="false" height="17.96875"
          horizontalTextPosition="center" iconTextGap="4" modelName="custom"
          textColor="#000000" verticalTextPosition="bottom" visible="true"
          width="67.984375" x="6.0078125" xml:space="preserve"
          y="11.015625">3<y:LabelModel>
          <y:SmartNodeLabelModel distance="4.0"/></y:LabelModel>
          <y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0"
          labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0"
          offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
        </y:GenericNode>
      </data>
    </node>
    <edge id="e0" source="n0" target="n1">
      <data key="d7">
        <y:PolyLineEdge>
          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
          <y:LineStyle color="#000000" type="line" width="1.0"/>
          <y:Arrows source="none" target="standard"/>
          <y:BendStyle smoothed="false"/>
        </y:PolyLineEdge>
      </data>
    </edge>
  </graph>
  <data key="d0">
    <y:Resources/>
  </data>
</graphml>
r   T©Úforce_multigraph)r   r   r   r   r   )r˜   Úlabelr4   Ú2r   Ú3Ú
shape_typeÚ	rectanglezcom.yworks.flowchart.terminatorÚdescriptionzdescription
line1
line2r   r   )rA   rB   rC   r;   rm   Úlistrp   Úhas_edgero   rq   rr   )rt   rl   ra   r   ru   rb   rb   rc   Útest_yfiles_extension+  sF   Z


z%TestReadGraphML.test_yfiles_extensionc                 C   s¦   d}t  | d¡¡}t |¡}t |¡}||fD ]8}|jd d s#J ‚|jd d r,J ‚|jd d r5J ‚|jd d s>J ‚|jd d rGJ ‚|jd	 d sPJ ‚qd S )
NaU  <?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key id="d0" for="node" attr.name="test" attr.type="boolean">
    <default>false</default>
  </key>
  <graph id="G" edgedefault="directed">
    <node id="n0">
      <data key="d0">true</data>
    </node>
    <node id="n1"/>
    <node id="n2">
      <data key="d0">false</data>
    </node>
    <node id="n3">
      <data key="d0">FaLsE</data>
    </node>
    <node id="n4">
      <data key="d0">True</data>
    </node>
    <node id="n5">
      <data key="d0">0</data>
    </node>
    <node id="n6">
      <data key="d0">1</data>
    </node>
  </graph>
</graphml>
r   r   Útestr   r   r   r   r   )rA   rB   rC   r;   rm   rr   ro   )rt   rŒ   ra   r   ru   rG   rb   rb   rc   Ú	test_bool«  s   

úzTestReadGraphML.test_boolc           	      C   s–   d}d}d}||fD ]$}t  | d¡¡}t |¡}t |¡}||fD ]}|jd d s-J ‚q"q
t  | d¡¡}t tj	tj|¡ t tj	tj|¡ d S )Naþ  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key id="d0" for="node" attr.name="test" attr.type="boolean">
    <default>false</default>
  </key>
  <graph id="G">
    <node id="n0">
      <data key="d0">true</data>
    </node>
  </graph>
</graphml>
a  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml>
  <key id="d0" for="node" attr.name="test" attr.type="boolean">
    <default>false</default>
  </key>
  <graph id="G">
    <node id="n0">
      <data key="d0">true</data>
    </node>
  </graph>
</graphml>
a%  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="https://ghghgh">
  <key id="d0" for="node" attr.name="test" attr.type="boolean">
    <default>false</default>
  </key>
  <graph id="G">
    <node id="n0">
      <data key="d0">true</data>
    </node>
  </graph>
</graphml>
r   r   rÇ   )
rA   rB   rC   r;   rm   rr   ro   rˆ   r‰   rŠ   )	rt   ÚgoodÚbadÚuglyrŒ   ra   r   ru   rG   rb   rb   rc   Útest_graphml_header_lineÖ  s   

ÿz(TestReadGraphML.test_graphml_header_linec                 C   sb   d}t  | d¡¡}t |¡}dd„ |jddD ƒ}t|ƒdks"J ‚|D ]
}|d d	ks.J ‚q$d S )
Na‡I  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
  <!--Created by yEd 3.17-->
  <key attr.name="Description" attr.type="string" for="graph" id="d0"/>
  <key for="port" id="d1" yfiles.type="portgraphics"/>
  <key for="port" id="d2" yfiles.type="portgeometry"/>
  <key for="port" id="d3" yfiles.type="portuserdata"/>
  <key attr.name="CustomProperty" attr.type="string" for="node" id="d4">
    <default/>
  </key>
  <key attr.name="url" attr.type="string" for="node" id="d5"/>
  <key attr.name="description" attr.type="string" for="node" id="d6"/>
  <key for="node" id="d7" yfiles.type="nodegraphics"/>
  <key for="graphml" id="d8" yfiles.type="resources"/>
  <key attr.name="url" attr.type="string" for="edge" id="d9"/>
  <key attr.name="description" attr.type="string" for="edge" id="d10"/>
  <key for="edge" id="d11" yfiles.type="edgegraphics"/>
  <graph edgedefault="directed" id="G">
    <data key="d0"/>
    <node id="n0">
      <data key="d4"><![CDATA[CustomPropertyValue]]></data>
      <data key="d6"/>
      <data key="d7">
        <y:ShapeNode>
          <y:Geometry height="30.0" width="30.0" x="125.0" y="-255.4611111111111"/>
          <y:Fill color="#FFCC00" transparent="false"/>
          <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">2<y:LabelModel>
              <y:SmartNodeLabelModel distance="4.0"/>
            </y:LabelModel>
            <y:ModelParameter>
              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
            </y:ModelParameter>
          </y:NodeLabel>
          <y:Shape type="rectangle"/>
        </y:ShapeNode>
      </data>
    </node>
    <node id="n1" yfiles.foldertype="group">
      <data key="d4"><![CDATA[CustomPropertyValue]]></data>
      <data key="d5"/>
      <data key="d6"/>
      <data key="d7">
        <y:ProxyAutoBoundsNode>
          <y:Realizers active="0">
            <y:GroupNode>
              <y:Geometry height="250.38333333333333" width="140.0" x="-30.0" y="-330.3833333333333"/>
              <y:Fill color="#F5F5F5" transparent="false"/>
              <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
              <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="140.0" x="0.0" y="0.0">Group 3</y:NodeLabel>
              <y:Shape type="roundrectangle"/>
              <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
              <y:BorderInsets bottom="1" bottomF="1.0" left="0" leftF="0.0" right="0" rightF="0.0" top="1" topF="1.0001736111111086"/>
            </y:GroupNode>
            <y:GroupNode>
              <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
              <y:Fill color="#F5F5F5" transparent="false"/>
              <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
              <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.201171875" x="-7.6005859375" y="0.0">Folder 3</y:NodeLabel>
              <y:Shape type="roundrectangle"/>
              <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
              <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
            </y:GroupNode>
          </y:Realizers>
        </y:ProxyAutoBoundsNode>
      </data>
      <graph edgedefault="directed" id="n1:">
        <node id="n1::n0" yfiles.foldertype="group">
          <data key="d4"><![CDATA[CustomPropertyValue]]></data>
          <data key="d5"/>
          <data key="d6"/>
          <data key="d7">
            <y:ProxyAutoBoundsNode>
              <y:Realizers active="0">
                <y:GroupNode>
                  <y:Geometry height="83.46111111111111" width="110.0" x="-15.0" y="-292.9222222222222"/>
                  <y:Fill color="#F5F5F5" transparent="false"/>
                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="110.0" x="0.0" y="0.0">Group 1</y:NodeLabel>
                  <y:Shape type="roundrectangle"/>
                  <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
                  <y:BorderInsets bottom="1" bottomF="1.0" left="0" leftF="0.0" right="0" rightF="0.0" top="1" topF="1.0001736111111086"/>
                </y:GroupNode>
                <y:GroupNode>
                  <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
                  <y:Fill color="#F5F5F5" transparent="false"/>
                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.201171875" x="-7.6005859375" y="0.0">Folder 1</y:NodeLabel>
                  <y:Shape type="roundrectangle"/>
                  <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                  <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
                </y:GroupNode>
              </y:Realizers>
            </y:ProxyAutoBoundsNode>
          </data>
          <graph edgedefault="directed" id="n1::n0:">
            <node id="n1::n0::n0">
              <data key="d4"><![CDATA[CustomPropertyValue]]></data>
              <data key="d6"/>
              <data key="d7">
                <y:ShapeNode>
                  <y:Geometry height="30.0" width="30.0" x="50.0" y="-255.4611111111111"/>
                  <y:Fill color="#FFCC00" transparent="false"/>
                  <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">1<y:LabelModel>
                      <y:SmartNodeLabelModel distance="4.0"/>
                    </y:LabelModel>
                    <y:ModelParameter>
                      <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                    </y:ModelParameter>
                  </y:NodeLabel>
                  <y:Shape type="rectangle"/>
                </y:ShapeNode>
              </data>
            </node>
            <node id="n1::n0::n1">
              <data key="d4"><![CDATA[CustomPropertyValue]]></data>
              <data key="d6"/>
              <data key="d7">
                <y:ShapeNode>
                  <y:Geometry height="30.0" width="30.0" x="0.0" y="-255.4611111111111"/>
                  <y:Fill color="#FFCC00" transparent="false"/>
                  <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">3<y:LabelModel>
                      <y:SmartNodeLabelModel distance="4.0"/>
                    </y:LabelModel>
                    <y:ModelParameter>
                      <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                    </y:ModelParameter>
                  </y:NodeLabel>
                  <y:Shape type="rectangle"/>
                </y:ShapeNode>
              </data>
            </node>
          </graph>
        </node>
        <node id="n1::n1" yfiles.foldertype="group">
          <data key="d4"><![CDATA[CustomPropertyValue]]></data>
          <data key="d5"/>
          <data key="d6"/>
          <data key="d7">
            <y:ProxyAutoBoundsNode>
              <y:Realizers active="0">
                <y:GroupNode>
                  <y:Geometry height="83.46111111111111" width="110.0" x="-15.0" y="-179.4611111111111"/>
                  <y:Fill color="#F5F5F5" transparent="false"/>
                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="110.0" x="0.0" y="0.0">Group 2</y:NodeLabel>
                  <y:Shape type="roundrectangle"/>
                  <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
                  <y:BorderInsets bottom="1" bottomF="1.0" left="0" leftF="0.0" right="0" rightF="0.0" top="1" topF="1.0001736111111086"/>
                </y:GroupNode>
                <y:GroupNode>
                  <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
                  <y:Fill color="#F5F5F5" transparent="false"/>
                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.201171875" x="-7.6005859375" y="0.0">Folder 2</y:NodeLabel>
                  <y:Shape type="roundrectangle"/>
                  <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                  <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
                </y:GroupNode>
              </y:Realizers>
            </y:ProxyAutoBoundsNode>
          </data>
          <graph edgedefault="directed" id="n1::n1:">
            <node id="n1::n1::n0">
              <data key="d4"><![CDATA[CustomPropertyValue]]></data>
              <data key="d6"/>
              <data key="d7">
                <y:ShapeNode>
                  <y:Geometry height="30.0" width="30.0" x="0.0" y="-142.0"/>
                  <y:Fill color="#FFCC00" transparent="false"/>
                  <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">5<y:LabelModel>
                      <y:SmartNodeLabelModel distance="4.0"/>
                    </y:LabelModel>
                    <y:ModelParameter>
                      <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                    </y:ModelParameter>
                  </y:NodeLabel>
                  <y:Shape type="rectangle"/>
                </y:ShapeNode>
              </data>
            </node>
            <node id="n1::n1::n1">
              <data key="d4"><![CDATA[CustomPropertyValue]]></data>
              <data key="d6"/>
              <data key="d7">
                <y:ShapeNode>
                  <y:Geometry height="30.0" width="30.0" x="50.0" y="-142.0"/>
                  <y:Fill color="#FFCC00" transparent="false"/>
                  <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">6<y:LabelModel>
                      <y:SmartNodeLabelModel distance="4.0"/>
                    </y:LabelModel>
                    <y:ModelParameter>
                      <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                    </y:ModelParameter>
                  </y:NodeLabel>
                  <y:Shape type="rectangle"/>
                </y:ShapeNode>
              </data>
            </node>
          </graph>
        </node>
      </graph>
    </node>
    <node id="n2">
      <data key="d4"><![CDATA[CustomPropertyValue]]></data>
      <data key="d6"/>
      <data key="d7">
        <y:ShapeNode>
          <y:Geometry height="30.0" width="30.0" x="125.0" y="-142.0"/>
          <y:Fill color="#FFCC00" transparent="false"/>
          <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">9<y:LabelModel>
              <y:SmartNodeLabelModel distance="4.0"/>
            </y:LabelModel>
            <y:ModelParameter>
              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
            </y:ModelParameter>
          </y:NodeLabel>
          <y:Shape type="rectangle"/>
        </y:ShapeNode>
      </data>
    </node>
    <edge id="n1::n1::e0" source="n1::n1::n0" target="n1::n1::n1">
      <data key="d10"/>
      <data key="d11">
        <y:PolyLineEdge>
          <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
          <y:LineStyle color="#000000" type="line" width="1.0"/>
          <y:Arrows source="none" target="standard"/>
          <y:BendStyle smoothed="false"/>
        </y:PolyLineEdge>
      </data>
    </edge>
    <edge id="n1::n0::e0" source="n1::n0::n1" target="n1::n0::n0">
      <data key="d10"/>
      <data key="d11">
        <y:PolyLineEdge>
          <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
          <y:LineStyle color="#000000" type="line" width="1.0"/>
          <y:Arrows source="none" target="standard"/>
          <y:BendStyle smoothed="false"/>
        </y:PolyLineEdge>
      </data>
    </edge>
    <edge id="e0" source="n1::n0::n0" target="n0">
      <data key="d10"/>
      <data key="d11">
        <y:PolyLineEdge>
          <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
          <y:LineStyle color="#000000" type="line" width="1.0"/>
          <y:Arrows source="none" target="standard"/>
          <y:BendStyle smoothed="false"/>
        </y:PolyLineEdge>
      </data>
    </edge>
    <edge id="e1" source="n1::n1::n1" target="n2">
      <data key="d10"/>
      <data key="d11">
        <y:PolyLineEdge>
          <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
          <y:LineStyle color="#000000" type="line" width="1.0"/>
          <y:Arrows source="none" target="standard"/>
          <y:BendStyle smoothed="false"/>
        </y:PolyLineEdge>
      </data>
    </edge>
  </graph>
  <data key="d8">
    <y:Resources/>
  </data>
</graphml>
r   c                 S   s   g | ]\}}|‘qS rb   rb   )r©   Ú_Úxrb   rb   rc   Ú
<listcomp>(  ó    zDTestReadGraphML.test_read_attributes_with_groups.<locals>.<listcomp>Trk   é	   ÚCustomPropertyÚ )rA   rB   rC   r;   rm   ro   Úlen)rt   rl   ra   r   Ú	node_datarb   rb   rc   Ú test_read_attributes_with_groups	  s     
ÿz0TestReadGraphML.test_read_attributes_with_groupsc                 C   st   d}t  | d¡¡}t |¡}dddifg}t|jddƒ|ks"J ‚| d¡ t |¡}t|jddƒ|ks8J ‚d S )	NaÝ  <?xml version='1.0' encoding='utf-8'?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key attr.name="cudfversion" attr.type="long" for="node" id="d6" />
  <graph edgedefault="directed">
    <node id="n1">
      <data key="d6">4284</data>
    </node>
  </graph>
</graphml>r   r   Úcudfversioni¼  Trk   r   )	rA   rB   rC   r;   rm   rn   ro   rq   rr   r”   rb   rb   rc   Útest_long_attribute_type-  s   


z(TestReadGraphML.test_long_attribute_typeN)re   rf   rg   rw   rz   r|   r}   r~   r„   r…   r   r   r   r‘   r–   r»   rÆ   rÈ   rÌ   rÖ   rØ   rb   rb   rb   rc   ri   9  s,    - +3  &ri   c                   @   sº   e Zd ZeejƒZedd„ ƒZdd„ Z	dd„ Z
dd„ Zd	d
„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ Zd'd(„ Zd)S )*ÚTestWriteGraphMLc                 C   s   t  ¡  t d¡}d S )Nú
lxml.etree)r   rd   rˆ   Úimportorskip)r`   rÍ   rb   rb   rc   rd   H  s   zTestWriteGraphML.setup_classc                 C   sD   zdd l }tjtjksJ ‚W d S  ty!   tjtjksJ ‚Y d S w ry   )Ú
lxml.etreer;   r´   Úwrite_graphml_lxmlÚImportErrorÚwrite_graphml_xml)rt   Úlxmlrb   rb   rc   Útest_write_interfaceM  s   ÿz%TestWriteGraphML.test_write_interfacec                 C   s¤   | j }d|jd< t ¡ }|  ||¡ | d¡ t |¡}t| 	¡ ƒt| 	¡ ƒks*J ‚t| 
¡ ƒt| 
¡ ƒks8J ‚t|j
ddƒt|j
ddƒksJJ ‚| j d¡ d S )NÚthereÚhir   Trk   ©r=   rG   rA   rB   Úwriterrq   r;   rm   rn   ro   rp   rD   ©rt   r   ra   ru   rb   rb   rc   Ú'test_write_read_simple_directed_graphmlU  s   


$z8TestWriteGraphML.test_write_read_simple_directed_graphmlc                 C   s&   t ƒ }| j}| ¡ }| ||g¡ d S ©N)r   r=   ÚcopyÚ
add_graphs)rt   Úgmlwr   ru   rb   rb   rc   Útest_GraphMLWriter_add_graphsa  s   z.TestWriteGraphML.test_GraphMLWriter_add_graphsc                 C   s²   | j }d|jd< d|jd< t ¡ }| j||dd | d¡ t |¡}t| 	¡ ƒt| 	¡ ƒks1J ‚t| 
¡ ƒt| 
¡ ƒks?J ‚t|j
dd	ƒt|j
dd	ƒksQJ ‚| j d¡ d S )
Nrâ   rã   r4   r   F)Úprettyprintr   Trk   rä   ræ   rb   rb   rc   Ú%test_write_read_simple_no_prettyprintg  s   



$z6TestWriteGraphML.test_write_read_simple_no_prettyprintc                 C   sà  ddl m} | j}t ¡ }| j||dd | d¡ t |¡}| d¡ t	| 
¡ | 
¡ ƒs/J ‚t| ¡ | ¡ ƒs:J ‚t|jdd|jddƒsIJ ‚| j d¡ ||ƒ}t| ¡ ƒ}t|ƒdksaJ ‚dd„ |d d	… D ƒ}t|ƒd	kstJ ‚d
|d v s|J ‚d|d v s„J ‚d|d v sŒJ ‚d|d v s”J ‚d|d v sœJ ‚d|d v s¤J ‚t ¡ }t ||¡ | d¡ t |¡}t ¡ }	tj||	dd |	 d¡ t |	¡}
tdd„ t|j
|
j
ƒD ƒƒsÞJ ‚tdd„ t|j|
jƒD ƒƒsîJ ‚d S )Nr   ©ÚparseT)Únamed_key_idsrk   é   c                 S   ó   g | ]}|  ¡ ‘qS rb   ©r®   ©r©   Úchildrb   rb   rc   rÏ   ˆ  rÐ   zTTestWriteGraphML.test_write_read_attribute_named_key_ids_graphml.<locals>.<listcomp>é   )r   r7   )ú	attr.namer7   )r   r3   r8   )rø   r3   )r   r2   r—   )rø   r2   c                 s   ó    | ]	\}}||kV  qd S rè   rb   )r©   r   r   rb   rb   rc   Ú	<genexpr>ž  ó   € zSTestWriteGraphML.test_write_read_attribute_named_key_ids_graphml.<locals>.<genexpr>c                 s   rù   rè   rb   )r©   r!   r"   rb   rb   rc   rú   Ÿ  rû   )Úxml.etree.ElementTreerð   rM   rA   rB   rå   rq   r;   rm   r   ro   r   rp   rN   rÄ   ÚgetrootrÔ   r´   Úallr   )rt   rð   r   ra   ru   ÚxmlÚchildrenr“   Údefault_behavior_fhÚnamed_key_ids_behavior_fhÚJrb   rb   rc   Ú/test_write_read_attribute_named_key_ids_graphmlt  s@   






 $z@TestWriteGraphML.test_write_read_attribute_named_key_ids_graphmlc                 C   s  ddl m} | j}t ¡ }| j||dd | d¡ t |¡}| d¡ t	| 
¡ | 
¡ ƒs/J ‚t| ¡ | ¡ ƒs:J ‚t|jdd|jddƒsIJ ‚| j d¡ ||ƒ}t| ¡ ƒ}t|ƒdksaJ ‚dd„ |d d	… D ƒ}t|ƒd	kstJ ‚d
|d v s|J ‚d
|d v s„J ‚d S )Nr   rï   T©Úinfer_numeric_typesrk   r÷   c                 S   ró   rb   rô   rõ   rb   rb   rc   rÏ   µ  rÐ   zSTestWriteGraphML.test_write_read_attribute_numeric_type_graphml.<locals>.<listcomp>r—   )z	attr.typeÚdoubler8   )rü   rð   rP   rA   rB   rå   rq   r;   rm   r   ro   r   rp   rQ   rÄ   rý   rÔ   )rt   rð   r   ra   ru   rÿ   r   r“   rb   rb   rc   Ú.test_write_read_attribute_numeric_type_graphml¡  s$   


z?TestWriteGraphML.test_write_read_attribute_numeric_type_graphmlc                 C   sr   t  ¡ }| ddg¡ |d }|  ||¡ t  |¡}| ¡ s J ‚t|jdd|jddƒs/J ‚|j|jks7J ‚dS )zàWriting keys as edge id attributes means keys become strings.
        The original keys are stored as data, so read them back in
        if `str(key) == edge_id`
        This allows the adjacency to remain the same.
        ©r‚   rƒ   r—   )r‚   rƒ   r÷   útest.graphmlTr’   N)	r;   rW   r@   rå   rm   Úis_multigraphr   rp   r¶   ©rt   Útmp_pathr   Úfnameru   rb   rb   rc   Útest_more_multigraph_keys»  s   
z*TestWriteGraphML.test_more_multigraph_keysc                 C   sÄ   t jdd}|jdddd t  |g d¢¡ |jdddd	 d
di|jd< ddi|jd< t ¡ }|  ||¡ | 	d¡ t j
|td}t| ¡ | ¡ ƒsMJ ‚t| ¡ | ¡ ƒsXJ ‚|j|jks`J ‚d S )NÚFred)Únamer8   r   )r¾   r   )r   r8   r—   r÷   r—   r÷   r9   r   r   r   r    é   Úedge_defaultr   r¤   )r;   rS   r>   Úadd_pathr?   rG   rA   rB   rå   rq   rm   rµ   r   ro   r   rp   ræ   rb   rb   rc   Útest_default_attributeÊ  s   
z'TestWriteGraphML.test_default_attributec                 C   sÀ   t  ¡ }|jddd |jddd |jdddd |jdddd t ¡ }|  ||¡ | d¡ t  |¡}|j	d d r?J ‚|j	d d dksJJ ‚|j
d d rSJ ‚|j
d d dks^J ‚d S )	Nr   F©Úspecialr   r   r  ©r   r   r   ©r   r   r8   ©r;   rW   r>   r?   rA   rB   rå   rq   rm   ro   rp   ræ   rb   rb   rc   Útest_mixed_type_attributesÙ  s   

z+TestWriteGraphML.test_mixed_type_attributesc                 C   sÈ   t  ¡ }|jddd |jddd |jdddd |jdddd t ¡ }|  ||¡ | d¡ t  |¡}|j	d d dksAJ ‚|j	d d dksLJ ‚|j
d d dksWJ ‚|j
d d dksbJ ‚d S )	Nr   Úhellor  r   r   r  r  r  r  ræ   rb   rb   rc   Ú%test_str_number_mixed_type_attributesè  s   

z6TestWriteGraphML.test_str_number_mixed_type_attributesc                 C   sÞ   t  d¡}t ¡ }|jd| d¡d |jddd |jdd| d¡d |jdddd t ¡ }|  	||¡ | 
d¡ t |¡}|jd d	 dksLJ ‚|jd d	 dksWJ ‚|jd
 d	 dksbJ ‚|jd d	 dksmJ ‚d S )NÚnumpyr   r   r  r   r8   r—   r÷   r  r  r  )rˆ   rÛ   r;   rW   r>   Úint64r?   rA   rB   rå   rq   rm   ro   rp   )rt   Únpr   ra   ru   rb   rb   rc   Ú%test_mixed_int_type_number_attributes÷  s   


z6TestWriteGraphML.test_mixed_int_type_number_attributesc                 C   s°   t  ¡ }| ddg¡ |d }|  ||¡ t  |¡}| ¡ r J ‚t j|dd}| ¡ s-J ‚| ddd¡ |d }|  ||¡ t  |¡}| ¡ sIJ ‚t j|dd}| ¡ sVJ ‚d S )	Nr	  )rƒ   Úcr÷   r
  Tr¼   r‚   rƒ   ze-id)r;   rW   r@   rå   rm   r  r?   r  rb   rb   rc   Útest_multigraph_to_graph  s   

z)TestWriteGraphML.test_multigraph_to_graphc                 C   s˜  ddl m} t ¡ }| g d¢¡ dd„ |jD ƒ}t ||d¡ |d }| j||dd tj|dd}t 	|¡}t
| ¡ | ¡ ƒsCJ ‚t| ¡ | ¡ ƒsNJ ‚t ||d	¡ t|jd
d|jd
dƒsdJ ‚||ƒ}t| ¡ ƒ}	t|	ƒdksvJ ‚dd„ | ¡  d¡D ƒ}
t|
ƒt| ¡ ƒksŽJ ‚d |¡}t |¡}t| ¡ ƒt| ¡ ƒks¦J ‚t| ¡ ƒt| ¡ ƒks´J ‚t ||d	¡ t|jd
d|jd
dƒsÊJ ‚d S )Nr   rï   )©r‚   rƒ   ©rƒ   r"  ©r‚   r"  c                 S   ó   i | ]}|t |ƒ“qS rb   r§   ©r©   Úerb   rb   rc   r¬      ó    zOTestWriteGraphML.test_write_generate_edge_id_from_attribute.<locals>.<dictcomp>Úeidr
  ©Úedge_id_from_attributer   Trk   r—   c                 S   ó   g | ]}|j d  ‘qS r
   ©Úattrib©r©   Úedgerb   rb   rc   rÏ   2  ó    ÿÿzOTestWriteGraphML.test_write_generate_edge_id_from_attribute.<locals>.<listcomp>ú..//{http://graphml.graphdrawing.org/xmlns}edgerÓ   )rü   rð   r;   rS   r@   rp   Úset_edge_attributesrå   Úgenerate_graphmlrm   r   ro   r   rÄ   rý   rÔ   Úfindallrn   ÚvaluesÚjoinrr   )rt   r  rð   r   Úedge_attributesr  Ú	generatorru   Útreer   Úedge_idsrl   r  rb   rb   rc   Ú*test_write_generate_edge_id_from_attribute  s8   
ÿþ

"z;TestWriteGraphML.test_write_generate_edge_id_from_attributec                 C   s  ddl m} t ¡ }| g d¢¡ dd„ |jD ƒ}t ||d¡ |d }| j||dd tj|dd}t 	|¡}| 
¡ s>J ‚tj	|d	d
}| 
¡ sKJ ‚t| ¡ | ¡ ƒsVJ ‚t| ¡ | ¡ ƒsaJ ‚tdd„ |jd	dD ƒƒt| ¡ ƒksvJ ‚tdd„ |jd	dD ƒƒt| ¡ ƒks‹J ‚||ƒ}t| ¡ ƒ}	t|	ƒdksJ ‚dd„ | ¡  d¡D ƒ}
t|
ƒt| ¡ ƒksµJ ‚d |¡}t |¡}| 
¡ sÅJ ‚t| ¡ | ¡ ƒsÐJ ‚t| ¡ | ¡ ƒsÛJ ‚tdd„ |jd	dD ƒƒt| ¡ ƒksðJ ‚tdd„ |jd	dD ƒƒt| ¡ ƒksJ ‚d S )Nr   rï   )r$  r%  r&  r$  c                 S   r'  rb   r§   r(  rb   rb   rc   r¬   I  r*  zZTestWriteGraphML.test_multigraph_write_generate_edge_id_from_attribute.<locals>.<dictcomp>r+  r
  r,  Tr¼   c                 s   ó     | ]\}}}|  d ¡V  qdS ©r+  N©Úget©r©   ÚuÚvrl   rb   rb   rc   rú   X  ó   € zYTestWriteGraphML.test_multigraph_write_generate_edge_id_from_attribute.<locals>.<genexpr>rk   c                 s   ó    | ]\}}}|V  qd S rè   rb   ©r©   rD  rE  r˜   rb   rb   rc   rú   \  ó   € r’   r—   c                 S   r.  r
   r/  r1  rb   rb   rc   rÏ   c  r3  zZTestWriteGraphML.test_multigraph_write_generate_edge_id_from_attribute.<locals>.<listcomp>r4  rÓ   c                 s   r?  r@  rA  rC  rb   rb   rc   rú   s  rF  c                 s   rG  rè   rb   rH  rb   rb   rc   rú   w  rI  )rü   rð   r;   rW   r@   rp   r5  rå   r6  rm   r  r   ro   r   rn   r8  rÄ   rý   rÔ   r7  r9  rr   )rt   r  rð   r   r:  r  r;  ru   r<  r   r=  Úgraphml_datar  rb   rb   rc   Ú5test_multigraph_write_generate_edge_id_from_attributeD  sP   

ÿ
ÿÿþ


ÿÿzFTestWriteGraphML.test_multigraph_write_generate_edge_id_from_attributec           	      C   ó¸   t  d¡}| d¡}t ddd|ifg¡}|d }|  ||¡ tj|td}|j|jks.J ‚|d d d }|d d d }|t j	|dd	ksIJ ‚t
|ƒ|jksRJ ‚t
|ƒtksZJ ‚d S ©
Nr  g333333@r8   r—   r    r
  r¤   gíµ ÷Æ°>)Úabs)rˆ   rÛ   Úfloat64r;   rS   rå   rm   rµ   rp   ÚapproxÚtypeÚfloat©	rt   r  r   Úwtr   r  ru   ÚwtGÚwtHrb   rb   rc   Útest_numpy_float64{  ó   

z#TestWriteGraphML.test_numpy_float64c           	      C   rL  rM  )rˆ   rÛ   Úfloat32r;   rS   rå   rm   rµ   rp   rP  rQ  rR  rS  rb   rb   rc   Útest_numpy_float32‰  rX  z#TestWriteGraphML.test_numpy_float32c                 C   sZ   t  d¡}| j}| d¡|jd d< |d }| j||dd t |¡}|j|jks+J ‚d S )Nr  r'   )r   r   r    r
  Tr  )	rˆ   rÛ   rP   rO  rp   rå   r;   rm   r¶   )rt   r  r   r   r  ru   rb   rb   rc   Útest_numpy_float64_inference—  s   

z-TestWriteGraphML.test_numpy_float64_inferencec                 C   s‚   t  ¡ }tdƒtdƒ tdƒ }tdƒtdƒ tdƒ }t}|j|d|d |d	 }|  ||¡ t j||d
}|j|jks?J ‚d S )Ni(	  é{   i  i§  i  iD  Ú	Radiohead)r	   r
  r¤   )r;   rS   Úchrr¨   r?   rå   rm   r¶   )rt   r  r   Úname1Úname2r¥   r  ru   rb   rb   rc   Útest_unicode_attributes   s   z(TestWriteGraphML.test_unicode_attributesc                 C   sp   dd l }ddi}| |¡}t ¡ }||jd< t ¡ }|  ||¡ | d¡ t 	|¡}|jd |jd ks6J ‚d S )Nr   r‚   z{"a": "123"}rÇ   )
ÚjsonÚdumpsr;   rS   rG   rA   rB   rå   rq   rm   )rt   rb  r‚   Úsar   ra   ru   rb   rb   rc   Útest_unicode_escape«  s   



z$TestWriteGraphML.test_unicode_escapeN)re   rf   rg   Ústaticmethodr;   rÝ   rå   rh   rd   rá   rç   rì   rî   r  r  r  r  r  r  r!  r#  r>  rK  rW  rZ  r[  ra  re  rb   rb   rb   rc   rÙ   E  s.    

-)7	rÙ   c                   @   s"   e Zd ZeejƒZedd„ ƒZdS )ÚTestXMLGraphMLc                 C   s   t  ¡  d S rè   )rÙ   rd   )r`   rb   rb   rc   rd   ½  s   zTestXMLGraphML.setup_classN)	re   rf   rg   rf  r;   rß   rå   rh   rd   rb   rb   rb   rc   rg  º  s    
rg  c                  C   sl   t  d¡ t ¡ } | jdg d¢d t ¡ }t jtdd t 	| |¡ W d  ƒ dS 1 s/w   Y  dS )úqTest that a detailed exception is raised when an attribute is of a type
    not supported by GraphML, e.g. a listrÚ   r   ©r   r8   r—   ©Úmy_list_attributeúGraphML does not support©ÚmatchN)
rˆ   rÛ   r;   rS   r>   rA   rB   r‰   Ú	TypeErrorr´   ©r   ra   rb   rb   rc   Ú1test_exception_for_unsupported_datatype_node_attrÂ  s   
"ÿrq  c                  C   sn   t  d¡ t ¡ } | jddg d¢d t ¡ }t jtdd t 	| |¡ W d  ƒ dS 1 s0w   Y  dS )	rh  rÚ   r   r8   ri  rj  rl  rm  N)
rˆ   rÛ   r;   rS   r?   rA   rB   r‰   ro  r´   rp  rb   rb   rc   Ú1test_exception_for_unsupported_datatype_edge_attrÎ  s   
"ÿrr  c                  C   sh   t  d¡ t ¡ } g d¢| jd< t ¡ }t jtdd t 	| |¡ W d  ƒ dS 1 s-w   Y  dS )rh  rÚ   ri  rk  rl  rm  N)
rˆ   rÛ   r;   rS   rG   rA   rB   r‰   ro  r´   rp  rb   rb   rc   Ú2test_exception_for_unsupported_datatype_graph_attrÚ  s   
"ÿrs  c                  C   sR   d} t  |  d¡¡}t |¡}|jd dddœksJ ‚|jd dd	dœks'J ‚d
S )zPTests that a GraphML string with an empty attribute can be parsed
    correctly.a¿  <?xml version='1.0' encoding='utf-8'?>
    <graphml>
      <key id="d1" for="node" attr.name="foo" attr.type="string"/>
      <key id="d2" for="node" attr.name="bar" attr.type="string"/>
      <graph>
        <node id="0">
          <data key="d1">aaa</data>
          <data key="d2">bbb</data>
        </node>
        <node id="1">
          <data key="d1">ccc</data>
          <data key="d2"></data>
        </node>
      </graph>
    </graphml>r   r/   ÚaaaÚbbb)r	   Úbarr4   ÚcccrÓ   N)rA   rB   rC   r;   rm   ro   )rŒ   ra   r   rb   rb   rc   Útest_empty_attributeæ  s
   
rx  )rA   rˆ   Únetworkxr;   Únetworkx.readwrite.graphmlr   Únetworkx.utilsr   r   r   ri   rÙ   rg  rq  rr  rs  rx  rb   rb   rb   rc   Ú<module>   s.      1        w