+
    )i                         ^ RI Ht ^ RIt^ RIt^ RIHu Ht ^ RI	H
t
Ht R tR t ! R R4      t ! R R	4      t ! R
 R4      t ! R R4      t ! R R4      tR# )    )BytesION)edges_equalnodes_equalc                     \         P                  ! R4      p \         P                  ! R4      p\         P                  P                  W4      '       g   Q hR# )zSee gh-7557s#   >>graph6<<P~~~~~~~~~~~~~~~~~~~~~~{
s"   >>graph6<<P~~~~~~~~~~~~~~~~~~~~~~{N)nxfrom_graph6_bytesutilsgraphs_equal)GHs     b/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/readwrite/tests/test_graph6.py.test_from_graph6_invariant_to_trailing_newliner   
   s?    
DEA
BCA88  &&&&    c                     \         P                  ! \        P                  4      ;_uu_ 4        \        P                  ! R4      p RRR4       R#   + '       g   i     R# ; i)z>graph6 headers must not be followed by a newline. See gh-7557.s#   >>graph6<<
P~~~~~~~~~~~~~~~~~~~~~~{N)pytestraisesr   NetworkXErrorr   )r   s    r   &test_from_graph6_raises_header_newliner      s7    	r''	(	(  !HI 
)	(	(	(   AA	c                   &   a  ] tR t^t o R tRtV tR# )TestGraph6Utilsc                ~   R F  p\         P                  ! \         P                  ! V4      4      ^ ,          V8X  g   Q h\         P                  ! \         P                  ! V4      4      ^,          . 8X  g   Q h\         P                  ! \         P                  ! V4      ^*^+.,           4      ^,          ^*^+.8X  d   K  Q h	  R# )r   N)
r      *   >   ?   @   i i  i-v l   ? )g6	data_to_n	n_to_data)selfis   & r   test_n_data_n_conversion(TestGraph6Utils.test_n_data_n_conversion   s    MA<<Q03q888<<Q03r999<<Q2r( :;A>2r(JJJ Nr    N)__name__
__module____qualname____firstlineno__r#   __static_attributes____classdictcell____classdict__s   @r   r   r      s     K Kr   r   c                   ,   a  ] tR t^t o R tR tRtV tR# )TestFromGraph6Bytesc                    R p\         P                  ! V4      p\        VP                  4       . RO4      '       g   Q h\	        VP                  4       . RO4      '       g   Q hR# )   DF{N)r   r            ))r   r3   )r   r4   )r   r3   )r   r4   )r2   r3   )r2   r4   )r3   r4   )r   r   r   nodesr   edges)r!   datar   s   &  r   test_from_graph6_bytes*TestFromGraph6Bytes.test_from_graph6_bytes    sS      &1779o6666GGIO
 
 	
 
r   c                8   R p\         P                  ! V4      p\        V4      p\         P                  ! V4      p\	        VP                  4       VP                  4       4      '       g   Q h\        VP                  4       VP                  4       4      '       g   Q hR# )r1   N)r   r   r   read_graph6r   r5   r   r6   )r!   r7   r   fhGins   &    r   test_read_equals_from_bytes/TestFromGraph6Bytes.test_read_equals_from_bytes(   sl      &T]nnR 1779ciik22221779ciik2222r   r%   N)r&   r'   r(   r)   r8   r>   r*   r+   r,   s   @r   r/   r/      s     
3 3r   r/   c                   &   a  ] tR t^1t o R tRtV tR# )TestReadGraph6c                    Rp\        V4      p\        P                  ! V4      p\        V4      ^8X  g   Q hV F'  p\	        V4      \        \        ^4      4      8X  d   K'  Q h	  R# )z5Test for reading many graphs from a file into a list.s   DF{
D`{
DqK
D~{
N)r   r   r;   lensortedlistrange)r!   r7   r<   glistr   s   &    r   test_read_many_graph6$TestReadGraph6.test_read_many_graph62   sR    &T]r"5zQA!9U1X... r   r%   N)r&   r'   r(   r)   rH   r*   r+   r,   s   @r   rA   rA   1   s     / /r   rA   c                   "  a  ] tR t^<t o RtR tR tR tR tR t	R t
]P                  P                  R]P                  ! 4       ]P                   ! 4       34      R	 4       tR
 tR tR t]P                  P                  RR4      R 4       tRtV tR# )TestWriteGraph6z:Unit tests for writing a graph to a file in graph6 format.c                    \        4       p\        P                  ! \        P                  ! 4       V4       VP	                  4       R 8X  g   Q hR#    >>graph6<<?
N)r   r   write_graph6
null_graphgetvaluer!   results   & r   test_null_graphTestWriteGraph6.test_null_graph?   s3    
0 $4444r   c                    \        4       p\        P                  ! \        P                  ! 4       V4       VP	                  4       R 8X  g   Q hR# s   >>graph6<<@
N)r   r   rO   trivial_graphrQ   rR   s   & r   test_trivial_graph"TestWriteGraph6.test_trivial_graphD   s6    
((*F3 $4444r   c                    \        4       p\        P                  ! \        P                  ! ^4      V4       VP	                  4       R8X  g   Q hR# r4   s   >>graph6<<C~
Nr   r   rO   complete_graphrQ   rR   s   & r   test_complete_graph#TestWriteGraph6.test_complete_graphI   s8    
))!,f5 $5555r   c                    \        4       p\        P                  ! \        P                  ! ^C4      VRR7       VP	                  4       R8X  g   Q hR# C   FheaderNsv  ~?@B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~w
r]   rR   s   & r   test_large_complete_graph)TestWriteGraph6.test_large_complete_graphN   s:    
))"-veD $AAAAr   c                    \        4       p\        P                  ! \        P                  ! ^4      VRR7       VP	                  4       R8X  g   Q hR# r4   Frd   s   C~
Nr]   rR   s   & r   test_no_headerTestWriteGraph6.test_no_headerS   s9    
))!,fUC G+++r   c                    \        4       p\        P                  ! ^^	4      p\        P                  ! W!RR7       VP	                  4       R8X  g   Q hR#    Frd   s   N??F~z{~Fw^_~?~?^_?
N)r   r   complete_bipartite_graphrO   rQ   )r!   rS   r   s   &  r   test_complete_bipartite_graph-TestWriteGraph6.test_complete_bipartite_graphX   s?    ''1-
%0 $<<<<r   r   c                    \         P                  ! \        P                  4      ;_uu_ 4        \        P                  ! V\        4       4       R R R 4       R #   + '       g   i     R # ; iN)r   r   r   NetworkXNotImplementedrO   r   r!   r   s   &&r    test_no_directed_or_multi_graphs0TestWriteGraph6.test_no_directed_or_multi_graphs_   s6    ]]24455OOAwy) 6555s    AA(	c                   \        \        ^4      4      . RO,            F  p\        P                  P	                  WV,          ^,          VR7      p\        4       p\        P                  ! W#RR7       VP                  4       P                  4       p\        V4      V^,
          V,          ^,          ^,           ^,          V^?8  d   ^M^,           8X  d   K  Q h	  R#    seedFrd   N   /   r   r   r   H   )
rE   rF   r   random_graphsgnm_random_graphr   rO   rQ   rstriprC   )r!   r"   ggstrs   &   r   test_lengthTestWriteGraph6.test_lengthd   s    eBi#;;;A  11!UaZa1HA9DOOAE2==?))+Dt9!a%1!1A!5! ;AFqPQ RRRR <r   c                   \        \        ^4      4      . RO,            F  p\        P                  P	                  WV,          ^,          VR7      p\        4       p\        P                  ! W#4       VP                  ^ 4       \        P                  ! V4      p\        VP                  4       VP                  4       4      '       g   Q h\        VP                  4       VP                  4       4      '       d   K  Q h	  R# rz   r{   Nr}   )rE   rF   r   r   r   r   rO   seekr;   r   r5   r   r6   )r!   r"   r   fr   s   &    r   test_roundtripTestWriteGraph6.test_roundtripm   s    eBi#;;;A  11!UaZa1HA	AOOA!FF1Iq!Aqwwy!'')4444qwwy!'')4444 <r   c                   \        VR ,          R4      ;_uu_ 4       p\        P                  ! \        P                  ! 4       V4       VP                  ^ 4       VP                  4       R8X  g   Q h RRR4       R#   + '       g   i     R# ; i)ztest.g6zw+brN   N)openr   write_graph6_filer   rP   r   read)r!   tmp_pathr   s   && r   test_write_pathTestWriteGraph6.test_write_pathw   s[    (Y&..!  !4FF1I668//// /...s   AA::B	edgec                    \         P                  ! V.4      p\        4       p\         P                  ! W#4       VP	                  ^ 4       VP                  4       R8X  g   Q hR# )r      >>graph6<<A_
N)r   Graphr   rO   r   r   )r!   r   r   r   s   &&  r   test_relabelingTestWriteGraph6.test_relabeling}   sE    HHdVI
	q	vvx,,,,r   r%   N)r   r   )r   r2   )r   r   )r&   r'   r(   r)   __doc__rT   rY   r_   rf   rj   rp   r   markparametrizer   
MultiGraphDiGraphrv   r   r   r   r   r*   r+   r,   s   @r   rK   rK   <   s     D5
5
6
B
,
= [[S2==?BJJL"AB* C*S50 [[V%>?- @-r   rK   c                     a  ] tR t^t o R tR tR tR tR tR t	]
P                  P                  R]P                  ! 4       ]P                  ! 4       34      R 4       tR	 tR
 t]
P                  P                  RR4      R 4       tRtV tR# )TestToGraph6Bytesc                j    \         P                  ! 4       p\        P                  ! V4      R 8X  g   Q hR# rM   )r   rP   r   to_graph6_bytesru   s   & r   rT   !TestToGraph6Bytes.test_null_graph   s'    MMO!!!$(8888r   c                j    \         P                  ! 4       p\        P                  ! V4      R 8X  g   Q hR# rW   )r   rX   r   r   ru   s   & r   rY   $TestToGraph6Bytes.test_trivial_graph   s*    !!!$(8888r   c                h    \         P                  ! \        P                  ! ^4      4      R8X  g   Q hR# r\   )r   r   r   r^   )r!   s   &r   r_   %TestToGraph6Bytes.test_complete_graph   s'    !!""3"3A"67;LLLLr   c                p    \         P                  ! ^C4      p\        P                  ! VRR7      R8X  g   Q hR# rb   r   r^   r   r   ru   s   & r   rf   +TestToGraph6Bytes.test_large_complete_graph   s.    b!!!!E26SSSSr   c                p    \         P                  ! ^4      p\        P                  ! VRR7      R8X  g   Q hR# ri   r   ru   s   & r   rj    TestToGraph6Bytes.test_no_header   s-    a !!!E2g===r   c                r    \         P                  ! ^^	4      p\        P                  ! VRR7      R8X  g   Q hR# rm   )r   ro   r   r   ru   s   & r   rp   /TestToGraph6Bytes.test_complete_bipartite_graph   s0    ''1-!!!E26NNNNr   r   c                    \         P                  ! \        P                  4      ;_uu_ 4        \        P
                  ! V4       R R R 4       R #   + '       g   i     R # ; irs   )r   r   r   rt   r   r   ru   s   &&r   rv   2TestToGraph6Bytes.test_no_directed_or_multi_graphs   s4    ]]24455q! 6555r   c                   \        \        ^4      4      . RO,            F  p\        P                  P	                  WV,          ^,          VR7      p\
        P                  ! VRR7      P                  4       p\        V4      V^,
          V,          ^,          ^,           ^,          V^?8  d   ^M^,           8X  d   K  Q h	  R# ry   )	rE   rF   r   r   r   r   r   r   rC   )r!   r"   r   r   s   &   r   r   TestToGraph6Bytes.test_length   s    eBi#;;;A  11!UaZa1HA%%a6==?Dt9!a%1!1A!5! ;AFqPQ RRRR	 <r   c                   \        \        ^4      4      . RO,            F  p\        P                  P	                  WV,          ^,          VR7      p\
        P                  ! V4      p\        P                  ! VP                  4       4      p\        VP                  4       VP                  4       4      '       g   Q h\        VP                  4       VP                  4       4      '       d   K  Q h	  R# r   )rE   rF   r   r   r   r   r   r   r   r   r5   r   r6   )r!   r"   r   r7   r   s   &    r   r    TestToGraph6Bytes.test_roundtrip   s    eBi#;;;A  11!UaZa1HA%%a(D$$T[[]3Aqwwy!'')4444qwwy!'')4444 <r   r   c                n    \         P                  ! V.4      p\        P                  ! V4      R 8X  g   Q hR# )r   N)r   r   r   r   )r!   r   r   s   && r   r   !TestToGraph6Bytes.test_relabeling   s,    HHdV!!!$(9999r   r%   Nr   )r&   r'   r(   r)   rT   rY   r_   rf   rj   rp   r   r   r   r   r   r   rv   r   r   r   r*   r+   r,   s   @r   r   r      s     99MT>O [[S2==?BJJL"AB" C"S5 [[V%>?: @:r   r   )ior   r   networkxr   networkx.readwrite.graph6	readwritegraph6r   networkx.utilsr   r   r   r   r   r/   rA   rK   r   r%   r   r   <module>r      sY       & & 3'JK K3 3$/ /G- G-T/: /:r   