+
    )im                        R t ^ RIHt ^ RIt^ RIt^ RIHt ]P                  ! R4      t	 ! R R4      t
R t]P                  P                  R]P                  ]P                  ]P                   ]P"                  .4      R	 4       tR
 tR# )z'Unit tests for pydot drawing functions.)StringION)graphs_equalpydotc                      a  ] tR t^t o ]P
                  P                  R]P                  ! 4       ]P                  ! 4       34      ]P
                  P                  RR4      R 4       4       t
R tRtV tR# )	TestPydotGprogc                   RVP                   R&   VP                  . RO4       VP                  R4       \        P                  P                  WR7      p\        V\        4      '       g   Q h\        P                  P                  V4      pVP                  \        P                  P                  V4      4      p\        W4      '       g   Q hVR,          pVP                  V4       \        P                  VRR7      p\        V4      ^8X  g   Q hV^ ,          p	\!        R VP#                  4        4       4      p
\!        R	 V	P#                  4        4       4      pW8X  g   Q h\!        R
 VP%                  4        4       4      p\!        R V	P%                  4        4       4      pW8X  g   Q h\        P                  P'                  V4      pVP                  V4      p\        W4      '       g   Q hR# )z
Validate :mod:`pydot`-based usage of the passed NetworkX graph with the
passed basename of an external GraphViz command (e.g., `dot`, `neato`).
r   nameEr   zout.dotzutf-8)pathencodingc              3   @   "   T F  qP                  4       x  K  	  R # 5iNget_name.0ps   & _/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/drawing/tests/test_pydot.py	<genexpr>'TestPydot.test_pydot.<locals>.<genexpr>:   s     <*;QJJLL*;   c              3   @   "   T F  qP                  4       x  K  	  R # 5ir   r   r   s   & r   r   r   =   s     >*=QJJLL*=r   c              3   `   "   T F$  qP                  4       VP                  4       3x  K&  	  R # 5ir   
get_sourceget_destinationr   es   & r   r   r   C   s$     UCTa\\^Q%6%6%89CT   ,.c              3   `   "   T F$  qP                  4       VP                  4       3x  K&  	  R # 5ir   r   r   s   & r   r   r   F   s$     WCVa\\^Q%6%6%89CVr!   N)AB)r$   Cr%   r&   )r$   D)graphadd_edges_fromadd_nodenxnx_pydotpydot_layout
isinstancedictto_pydot	__class__
from_pydotr   	write_rawr   graph_from_dot_filelensortedget_node_listget_edge_listread_dot)selfr   r   tmp_pathgraph_layoutPG2fnamePin_listPinn1n2e1e2Hins   &&&&           r   
test_pydotTestPydot.test_pydot   s     	
IJ	

3 {{///=,---- KK  # [[//23 A""""9$ 	
E ,,%',J 8}!!! qk <!//*;<< >#*;*;*=>> xx U1??CTUU W3CTCTCVWW xx kk""5)kk# A####    c                N   \         P                  ! 4       pR VP                  R&   VP                  RRRR7       \	        4       p\         P
                  P                  W4       VP                  ^ 4       \         P
                  P                  V4      p\        W4      '       g   Q hR# )r   r
   120)keyN)
r,   
MultiGraphr)   add_edger   r-   	write_dotseekr:   r   )r;   r   fhHs   &   r   test_read_writeTestPydot.test_read_writeR   su    MMO	

3
%Z
a$

KK  $A!!!!rJ    N)neatodot)__name__
__module____qualname____firstlineno__pytestmarkparametrizer,   GraphDiGraphrH   rV   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s`     [[S288:rzz|"<=[[V%56@$ 7 >@$D" "rJ   r   c                   \         P                  ! 4       pVP                  . RO4       \         P                  P	                  VRR7      p\        V\        4      '       g   Q h\         P                  P                  V4      p\         P                  ! \         P                  P                  V4      4      p\        W4      '       g   Q hR# )zValidate that `nx_pydot.pydot_layout` handles nodes
    with characters like "
", " ".

    Those characters cause `pydot` to escape and quote them on output,
    which caused #7581.
    rZ   r   N))
A
big testr%   )rh   r&   r'   )
r,   rb   r*   r-   r.   r/   r0   r1   r3   r   )r<   r   r=   r>   r?   s   &    r   test_pydot_issue_7581ri   ]   s     	
AMN;;++AE+:LlD)))) 	QA	"++((+	,BrJ   
graph_typec           	         V ! 4       pVP                  R \        ^.4      RRR7       VP                  R^RR\        R.4      R7       VP                  RRR	R
7       RRRR/RRRRRR/RR	/.\        P                  P	                  \        P                  P                  V4      4      P                  P                  4        UUu. uF  w   r#VNK
  	  upp8X  g   Q hVP                  4        Uu0 uF  p\        V4      kK  	  up\        \        P                  P	                  \        P                  P                  V4      4      P                  4      8X  g   Q hR# u uppi u upi )5z"Example:A"F)tlrL   Tnode1)wrm   rn   nodestring)rp   rm   rn   Falserp   Truez
('node1',)zfrozenset({'node1'})N)ro   )   ru   )rQ   	frozensetr,   r-   r3   r1   edgesdatanodesstrset)rj   r   _attris   &    r   test_hashable_pydotr   p   sA   
 	AJJsIqcNmuJ=JJsAy'/CJDJJvvJ* 
mS'*	fc<.DE	h ++001E1Ea1HIOOTTV
VJAq 	V
	   GGI&IqCFI&#
r{{33A67==+   

 's   E,Ec                  4   \         P                  ! 4       p V P                  RR.4       \         P                  P	                  V RR7      p\        V\        4      '       g   Q hRV9  g   Q h^ V9   g   Q hRV9  g   Q h^V9   g   Q hR V9   g   Q hRV9   g   Q hR# )	r$   r%   rZ   r   rN   rL   Nr#   )       )r,   rb   r*   r-   r.   r/   r0   )r   r=   s     r   test_pydot_numerical_namer      s    

Aj&)*;;++AE+:LlD))))l"""l""",,rJ   )__doc__ior   r_   networkxr,   networkx.utilsr   importorskipr   r   ri   r`   ra   rb   rc   rP   MultiDiGraphr   r   rX   rJ   r   <module>r      s|    -    'G$M" M"`& 288RZZH*
rJ   