ó
 ,µ[c           @   s°   d  d l  Td  d l m Z d  d l Z d  d l Td  d l Z d  d l Z d  d l Z d e	 f d „  ƒ  YZ
 d e
 f d „  ƒ  YZ d e
 f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   *(   t   SkipTestNt   BaseGraphMLc           B   s   e  Z d  „  Z RS(   c         C   s(  d |  _  t j ƒ  |  _ |  j j d ƒ |  j j d d d d ƒ|  j j d' d( d) d* d+ d, d- d. d/ d0 g
 ƒ t j |  j  j	 d ƒ ƒ |  _
 d |  _ t j d d ƒ |  _ i d d 6|  j j d <|  j j d d d ƒ|  j j d d d ƒ|  j j d d d ƒ|  j j d
 ƒ |  j j d	 d d ƒ|  j j d d d d d d ƒ|  j j d d d d d d ƒ|  j j d 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 d# ƒt j |  j j	 d ƒ ƒ |  _ d$ |  _ t j ƒ  |  _ |  j j d d d% ƒ|  j j d d d ƒ|  j j d d d d% ƒ|  j j d d d d ƒt j |  j j	 d ƒ ƒ } | |  _ d& |  _ t j ƒ  |  _ |  j j d ƒ |  j j d d d d ƒ|  j j d1 d2 g ƒ t j |  j j	 d ƒ ƒ } | |  _ d  S(3   Ns  <?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>t   n10t   n0t   n2t   idt   foot   n1t   n3t   n5t   n4t   n6t   n7t   n8t   n9s   UTF-8s  <?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>
t   Gt   yellowt   colort   node_defaultt   greent   bluet   redt	   turquoiset   e0t   weightg      ð?t   e1t   e2g       @t   e3t   e4t   e5t   e6gš™™™™™ñ?sC  <?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>
i   s  <?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   (   R   R	   (   R	   R
   (   R	   R   (   R   R   (   R   R
   (   R
   R   (   R   R   (   R   R   (   R   R   (   R   R   (   R   R	   (   t   simple_directed_datat   nxt   DiGrapht   simple_directed_grapht   add_nodet   add_edget   add_edges_fromt   iot   BytesIOt   encodet   simple_directed_fht   attribute_datat   attribute_grapht   grapht   attribute_fht   attribute_numeric_type_datat   attribute_numeric_type_grapht   attribute_numeric_type_fht   simple_undirected_datat   Grapht   simple_undirected_grapht   simple_undirected_fh(   t   selft   fh(    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   setUp   s^    	
+				
(   t   __name__t
   __module__R8   (    (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyR      s   t   TestReadGraphMLc           B   s}   e  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 d „  Z RS(   c         C   s7  |  j  } t j |  j ƒ } t t | j ƒ  ƒ t | j ƒ  ƒ ƒ t t | j ƒ  ƒ t | j ƒ  ƒ ƒ t t | j d t ƒ ƒ t | j d t ƒ ƒ ƒ |  j j	 d ƒ t j
 |  j ƒ } t t | j ƒ  ƒ t | j ƒ  ƒ ƒ t t | j ƒ  ƒ t | j ƒ  ƒ ƒ t t | j d t ƒ ƒ t | j d t ƒ ƒ ƒ d  S(   Nt   datai    (   R#   R!   t   read_graphmlR*   t   assert_equalt   sortedt   nodest   edgest   Truet   seekt   parse_graphmlR    (   R6   R   t   Ht   I(    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt!   test_read_simple_directed_graphml´   s    	%%%%c         C   s¥   |  j  } t j |  j ƒ } t | j ƒ  | j ƒ  ƒ t | j ƒ  | j ƒ  ƒ |  j j d ƒ t j	 |  j
 ƒ } t | j ƒ  | j ƒ  ƒ t | j ƒ  | j ƒ  ƒ d  S(   Ni    (   R4   R!   R=   R5   t   assert_nodes_equalR@   t   assert_edges_equalRA   RC   RD   R2   (   R6   R   RE   RF   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt#   test_read_simple_undirected_graphmlÃ   s    	c         C   sQ  |  j  } t j |  j ƒ } t | j t ƒ t | j d t ƒ ƒ ƒ t | j d t ƒ ƒ } t | j d t ƒ ƒ } x* t	 | | ƒ D] \ } } t
 | | ƒ qƒ W|  j j d ƒ t j |  j ƒ } t
 t | j t ƒ ƒ t | j d t ƒ ƒ ƒ t | j d t ƒ ƒ } t | j d t ƒ ƒ } x* t	 | | ƒ D] \ } } t
 | | ƒ q0Wd  S(   NR<   i    (   R,   R!   R=   R.   RH   R@   RB   R?   RA   t   zipR>   RC   RD   R+   (   R6   R   RE   t   get   het   at   bRF   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_read_attribute_graphmlÎ   s    	(.c         C   sN   d } t  j | j d ƒ ƒ } t t j t j | ƒ t t j t j | ƒ d  S(   NsÛ  <?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>s   UTF-8(   R'   R(   R)   t   assert_raisesR!   t   NetworkXErrorR=   RD   (   R6   t   sR7   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt    test_directed_edge_in_undirectedß   s    c         C   sN   d } t  j | j d ƒ ƒ } t t j t j | ƒ t t j t j | ƒ d  S(   Nsó  <?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>s   UTF-8(   R'   R(   R)   RQ   R!   RR   R=   RD   (   R6   RS   R7   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt    test_undirected_edge_in_directedñ   s    c         C   sN   d } t  j | j d ƒ ƒ } t t j t j | ƒ t t j t j | ƒ d  S(   Nsô  <?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>
s   UTF-8(   R'   R(   R)   RQ   R!   RR   R=   RD   (   R6   RS   R7   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_key_raise  s    c         C   sN   d } t  j | j d ƒ ƒ } t t j t j | ƒ t t j t j | ƒ d  S(   Ns5  <?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>
s   UTF-8(   R'   R(   R)   RQ   R!   RR   R=   RD   (   R6   RS   R7   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_hyperedge_raise  s    c         C   s—   d } t  j | j d ƒ ƒ } t j | ƒ } d	 d
 g } t t | j d t ƒ ƒ | ƒ | j	 d ƒ t j
 | ƒ } t t | j d t ƒ ƒ | ƒ d  S(   Nsß  <?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>
s   UTF-8R   R   R   R   t   keysi    (   R   R   R   (   R   R   R   (   R'   R(   R)   R!   R=   R>   R?   RA   RB   RC   RD   (   R6   RS   R7   R   t   expectedRE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_multigraph_keys=  s    c         C   sO  t  j ƒ  } | j d ƒ | j d ƒ | j d d d t d d ƒ f d d t d d ƒ f d d t d d d d ƒ f d d d	 t d d
 ƒ f d d d t d d ƒ f d d d t d d d d ƒ f g ƒ t j ƒ  } t  j | | ƒ | j d ƒ t  j	 | d t
 ƒ} t | j d t d t ƒ | j d t d t ƒ ƒ t | j | j ƒ d S(   sf   
        Test that data and keys of edges are preserved on consequent
        write and reads
        i   i   t   keyt	   data_key1R   t   data_id2t	   data_key3t   data_id3ig   t	   data_key4ih   t   data_id5ii   t	   data_key6t   data_id7i    t	   node_typeR<   RX   N(   i   i   (   R!   t
   MultiGraphR$   R&   t   dictR'   R(   t   write_graphmlRC   R=   t   intRI   RA   RB   R>   t   _adj(   R6   R   R7   RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_preserve_multi_edge_dataT  s$    %.c         C   s
  d } t  j | j d ƒ ƒ } t j | ƒ } t t | j ƒ  ƒ d
 g ƒ t | d d d d ƒ t | j d d d ƒ t | j d d d	 ƒ t j	 | ƒ } t t | j ƒ  ƒ d g ƒ t | d d d d ƒ t | j d d d ƒ t | j d d d	 ƒ d  S(   Ns†  <?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>
    <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>
s   UTF-8R   R   R   R   t   labelt   1t   2(   R   R   (   R   R   (
   R'   R(   R)   R!   R=   R>   t   listRA   R@   RD   (   R6   R<   R7   R   RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_yfiles_extensionq  s    Cc         C   sç   d } t  j | j d ƒ ƒ } t j | ƒ } t j | ƒ } x¤ | | g D]– } t | j d d t ƒ t | j d d t	 ƒ t | j d d t	 ƒ t | j d d t ƒ t | j d d t	 ƒ t | j d	 d t ƒ qI Wd  S(
   NsU  <?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>
s   UTF-8R   t   testR   R	   R   R
   R   (
   R'   R(   R)   R!   R=   RD   R>   R@   RB   t   False(   R6   RS   R7   R   RE   R-   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt	   test_boolÂ  s    c   	      C   sÖ   d } d } d } xy | | f D]k } t  j | j d ƒ ƒ } t j | ƒ } t j | ƒ } x, | | g D] } t | j d d t ƒ qh Wq Wt  j | j d ƒ ƒ } t	 t j
 t j | ƒ t	 t j
 t j | ƒ d  S(   Nsþ  <?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>
s  <?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>
s%  <?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>
s   UTF-8R   Rp   (   R'   R(   R)   R!   R=   RD   R>   R@   RB   RQ   RR   (	   R6   t   goodt   badt   uglyRS   R7   R   RE   R-   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_graphml_header_lineí  s     c         C   s‘   d } t  j | j d ƒ ƒ } t j | ƒ } g  | j d t ƒ D] \ } } | ^ q@ } t t | ƒ d ƒ x | D] } t	 | d d ƒ qr Wd  S(   Ns‡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>
s   UTF-8R<   i	   t   CustomPropertyt    (
   R'   R(   R)   R!   R=   R@   RB   R>   t   lent   assert_not_equal(   R6   R<   R7   R   t   _t   xt	   node_data(    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt    test_read_attributes_with_groups   s    ÿ +(   R9   R:   RG   RJ   RP   RT   RU   RV   RW   RZ   Rj   Ro   Rr   Rv   R~   (    (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyR;   ³   s   										Q	+	3t   TestWriteGraphMLc           B   s‰   e  Z e e j ƒ Z e d  „  ƒ Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d	 „  Z d
 „  Z d „  Z RS(   c         C   s4   y d d  l  } Wn t k
 r/ t d ƒ ‚ n Xd  S(   Niÿÿÿÿs   lxml.etree not available.(   t
   lxml.etreet   ImportErrorR   (   t   clst   lxml(    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt
   setupClassH  s    c         C   sN   y# d d  l  } t t j t j ƒ Wn$ t k
 rI t t j t j ƒ n Xd  S(   Niÿÿÿÿ(   R€   R>   R!   Rg   t   write_graphml_lxmlR   t   write_graphml_xml(   R6   Rƒ   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_write_interfaceO  s
    c         C   sÝ   |  j  } d | j d <t j ƒ  } |  j | | ƒ | j d ƒ t j | ƒ } t t	 | j
 ƒ  ƒ t	 | j
 ƒ  ƒ ƒ t t	 | j ƒ  ƒ t	 | j ƒ  ƒ ƒ t t	 | j d t ƒ ƒ t	 | j d t ƒ ƒ ƒ |  j j d ƒ d  S(   Nt   theret   hii    R<   (   R#   R-   R'   R(   t   writerRC   R!   R=   R>   R?   R@   RA   RB   R*   (   R6   R   R7   RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt'   test_write_read_simple_directed_graphmlV  s    	%%1c   	      C   sX  d d l  m } |  j } t j ƒ  } |  j | | d t ƒ| j d ƒ t j	 | ƒ } | j d ƒ t
 | j ƒ  | j ƒ  ƒ t | j ƒ  | j ƒ  ƒ t | j d t ƒ | j d t ƒ ƒ |  j j d ƒ | | ƒ } | j ƒ  j ƒ  } t t | ƒ d ƒ g  | d  D] } | j ƒ  ^ q} t t | ƒ d ƒ t d | d ƒ t d | d
 ƒ d  S(   Niÿÿÿÿ(   t   parset   infer_numeric_typesi    R<   i   i   s	   attr.typet   doublei   (   s	   attr.typeRŽ   (   s	   attr.typeRŽ   (   t   xml.etree.ElementTreeRŒ   R0   R'   R(   RŠ   RB   RC   R!   R=   RH   R@   RI   RA   R1   t   getroott   getchildrenR>   Ry   t   itemst	   assert_in(	   R6   RŒ   R   R7   RE   t   xmlt   childrent   childRX   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt.   test_write_read_attribute_numeric_type_graphmlb  s$    	%#c         C   s¶   t  j ƒ  } | j d d g ƒ t j ƒ  \ } } |  j | | ƒ t  j | ƒ } t | j ƒ  ƒ t	 | j
 d t ƒ | j
 d t ƒ ƒ t | j | j ƒ t j | ƒ t j | ƒ d S(	   så   Writing keys as edge id attributes means keys become strings.
        The original keys are stored as data, so read them back in
        if `make_str(key) == edge_id`
        This allows the adjacency to remain the same.
        RN   RO   i   i   RX   N(   RN   RO   i   (   RN   RO   i   (   R!   Re   R&   t   tempfilet   mkstempRŠ   R=   t   assert_truet   is_multigraphRI   RA   RB   R>   Ri   t   ost   closet   unlink(   R6   R   t   fdt   fnameRE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_more_multigraph_keys|  s    %c         C   s  t  j d d ƒ } | j d d d d d ƒt  j | d d d d	 g ƒ | j d d d
 d	 ƒi d d 6| j d <i d d
 6| j d <t j ƒ  } |  j | | ƒ | j	 d ƒ t  j
 | d t ƒ} t | j ƒ  | j ƒ  ƒ t | j ƒ  | j ƒ  ƒ t | j | j ƒ d  S(   Nt   namet   Fredi   Rk   R   R   i    i   i   R   R   R   i   t   edge_defaultRd   (   R!   R3   R$   t   add_pathR%   R-   R'   R(   RŠ   RC   R=   Rh   RH   R@   RI   RA   R>   (   R6   R   R7   RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_default_attribute  s    c         C   s~   t  j ƒ  } | j d d g ƒ t j ƒ  \ } } |  j | | ƒ t  j | ƒ } t | j ƒ  ƒ t	 j
 | ƒ t	 j | ƒ d  S(   NRN   RO   i   t   ci   (   RN   RO   i   (   RO   R§   i   (   R!   Re   R&   R˜   R™   RŠ   R=   t   assert_falseR›   Rœ   R   Rž   (   R6   R   RŸ   R    RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_multigraph_to_graphœ  s    c         C   s´   y d d  l  } Wn d  SX| j d ƒ } t j d d i | d 6f g ƒ } t j ƒ  \ } } |  j | | ƒ t j | d t ƒ} t	 | j
 | j
 ƒ t j | ƒ t j | ƒ d  S(   Niÿÿÿÿg333333@i   i   R   Rd   (   t   numpyt   floatR!   R3   R˜   R™   RŠ   R=   Rh   R>   Ri   Rœ   R   Rž   (   R6   t   npt   wtR   RŸ   R    RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_numpy_float§  s    "c   	      C   s  y d d  l  } Wn d  SX| j d ƒ } t j d d i | d 6f g ƒ } t j ƒ  \ } } |  j | | ƒ t j | d t ƒ} t	 | j
 | j
 ƒ | d d d } | d d d } t | | d d ƒt	 t | ƒ | j ƒ t	 t | ƒ t ƒ t j | ƒ t j | ƒ d  S(	   Niÿÿÿÿg333333@i   i   R   Rd   t   placesi   (   Rª   t   float64R!   R3   R˜   R™   RŠ   R=   Rh   R>   RA   t   assert_almost_equalt   typeR«   Rœ   R   Rž   (	   R6   R¬   R­   R   RŸ   R    RE   t   wtGt   wtH(    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_numpy_float64µ  s"    "c   	      C   s  y d d  l  } Wn d  SX| j d ƒ } t j d d i | d 6f g ƒ } t j ƒ  \ } } |  j | | ƒ t j | d t ƒ} t	 | j
 | j
 ƒ | d d d } | d d d } t | | d d ƒt	 t | ƒ | j ƒ t	 t | ƒ t ƒ t j | ƒ t j | ƒ d  S(	   Niÿÿÿÿg333333@i   i   R   Rd   R¯   i   (   Rª   t   float32R!   R3   R˜   R™   RŠ   R=   Rh   R>   RA   R±   R²   R«   Rœ   R   Rž   (	   R6   R¬   R­   R   RŸ   R    RE   R³   R´   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_numpy_float32È  s"    "c         C   s.  t  j ƒ  } yJ t d ƒ t d ƒ t d ƒ } t d ƒ t d ƒ t d ƒ } t } WnW t k
 r¯ t d ƒ t d ƒ t d ƒ } t d ƒ t d ƒ t d ƒ } t } n X| j | d d | ƒt j	 ƒ  \ } } |  j
 | | ƒ t  j | d	 | ƒ} t | j | j ƒ t j | ƒ t j | ƒ d  S(
   Ni(	  i{   i  i§  i  iD  t	   RadioheadR   Rd   (   R!   R3   t   chrt   strt
   ValueErrort   unichrt   unicodeR%   R˜   R™   RŠ   R=   R>   Ri   Rœ   R   Rž   (   R6   R   t   name1t   name2Rd   RŸ   R    RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_unicode_attributesÛ  s       
  
c         C   sÑ   d d  l  } t d d ƒ } y t d ƒ | j | ƒ } Wn& t k
 r` t | j | ƒ ƒ } n Xt j ƒ  } | | j d <t	 j
 ƒ  } |  j | | ƒ | j d ƒ t j | ƒ } t | j d | j d ƒ d  S(   NiÿÿÿÿRN   s   {"a": "123"}i(	  Rp   i    (   t   jsonRf   R¹   t   dumpsR»   R½   R!   R3   R-   R'   R(   RŠ   RC   R=   R>   (   R6   RÁ   RN   t   saR   R7   RE   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   test_unicode_escapeí  s    
(   R9   R:   t   staticmethodR!   R…   RŠ   t   classmethodR„   R‡   R‹   R—   R¡   R¦   R©   R®   Rµ   R·   RÀ   RÄ   (    (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyR   E  s   										t   TestXMLGraphMLc           B   s&   e  Z e e j ƒ Z e d  „  ƒ Z RS(   c         C   s4   y d d  l  } Wn t k
 r/ t d ƒ ‚ n Xd  S(   Niÿÿÿÿs$   xml.etree.ElementTree not available.(   R   R   R   (   R‚   R”   (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyR„     s    (   R9   R:   RÅ   R!   R†   RŠ   RÆ   R„   (    (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyRÇ   ÿ  s   (   t
   nose.toolst   noseR   t   networkxR!   t   networkx.testing.utilsR'   R˜   Rœ   t   objectR   R;   R   RÇ   (    (    (    sD   lib/python2.7/site-packages/networkx/readwrite/tests/test_graphml.pyt   <module>   s   

¨ÿ ÿ ”º